MCPcopy Index your code
hub / github.com/maruel/panicparse / name

Function name

stack/source.go:159–176  ·  view source on GitHub ↗
(n ast.Node)

Source from the content-addressed store, hash-verified

157}
158
159func name(n ast.Node) string {
160 switch t := n.(type) {
161 case *ast.InterfaceType:
162 return "interface{}"
163 case *ast.Ident:
164 return t.Name
165 case *ast.SelectorExpr:
166 return t.Sel.Name
167 case *ast.StarExpr:
168 return "*" + name(t.X)
169 case *ast.BasicLit:
170 return t.Value
171 case *ast.Ellipsis:
172 return "..."
173 default:
174 return "<unknown>"
175 }
176}
177
178// fieldToType returns the type name and whether if it's an ellipsis.
179func fieldToType(f *ast.Field) (string, bool) {

Callers 1

fieldToTypeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…