MCPcopy Index your code
hub / github.com/erda-project/erda / toString

Function toString

pkg/http/httpserver/errorresp/error_codes.go:102–112  ·  view source on GitHub ↗
(err interface{})

Source from the content-addressed store, hash-verified

100}
101
102func toString(err interface{}) string {
103 switch t := err.(type) {
104 case string:
105 return err.(string)
106 case error:
107 return err.(error).Error()
108 default:
109 _ = t
110 return fmt.Sprintf("%v", err)
111 }
112}
113
114func getCode(e error) string {
115 switch t := e.(type) {

Callers 1

InvalidParameterMethod · 0.85

Calls 2

ErrorMethod · 0.65
SprintfMethod · 0.45

Tested by

no test coverage detected