MCPcopy
hub / github.com/pquerna/ffjson / getType

Function getType

inception/decoder.go:269–283  ·  view source on GitHub ↗
(ic *Inception, name string, typ reflect.Type)

Source from the content-addressed store, hash-verified

267}
268
269func getType(ic *Inception, name string, typ reflect.Type) string {
270 s := typ.Name()
271
272 if typ.PkgPath() != "" && typ.PkgPath() != ic.PackagePath {
273 path := removeVendor(typ.PkgPath())
274 ic.OutputImports[`"`+path+`"`] = true
275 s = typ.String()
276 }
277
278 if s == "" {
279 return typ.String()
280 }
281
282 return s
283}
284
285// removeVendor removes everything before and including a '/vendor/'
286// substring in the package path.

Callers

nothing calls this directly

Calls 2

removeVendorFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…