(ic *Inception, name string, typ reflect.Type)
| 267 | } |
| 268 | |
| 269 | func 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. |
nothing calls this directly
no test coverage detected
searching dependent graphs…