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

Function removeVendor

inception/decoder.go:289–295  ·  view source on GitHub ↗

removeVendor removes everything before and including a '/vendor/' substring in the package path. This is needed becuase that full path can't be used in the import statement.

(path string)

Source from the content-addressed store, hash-verified

287// This is needed becuase that full path can't be used in the
288// import statement.
289func removeVendor(path string) string {
290 i := strings.Index(path, "/vendor/")
291 if i == -1 {
292 return path
293 }
294 return path[i+8:]
295}
296
297func buildTokens(containsOptional bool, optional string, required ...string) []string {
298 if containsOptional {

Callers 1

getTypeFunction · 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…