10 examples of 'golang vendor' in Go

Every line of 'golang vendor' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your Go code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
363func (x *OSClass) GetVendor() string {
364 if x != nil {
365 return x.Vendor
366 }
367 return ""
368}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

989func (x *SecretSuffix) GetVendor() bool {
990 if x != nil {
991 return x.Vendor
992 }
993 return false
994}
527func (m *Device) GetVendor() string {
528 if m != nil {
529 return m.Vendor
530 }
531 return ""
532}
43func (at AgentType) Vendor() string {
44 return strings.SplitN(string(at), "/", 2)[0]
45}
1167func (ld *loader) stdVendor(parentPath, path string) string {
1168 if search.IsStandardImportPath(path) {
1169 return path
1170 }
1171
1172 if str.HasPathPrefix(parentPath, "cmd") {
1173 if Target.Path != "cmd" {
1174 vendorPath := pathpkg.Join("cmd", "vendor", path)
1175 if _, err := os.Stat(filepath.Join(cfg.GOROOTsrc, filepath.FromSlash(vendorPath))); err == nil {
1176 return vendorPath
1177 }
1178 }
1179 } else if Target.Path != "std" || str.HasPathPrefix(parentPath, "vendor") {
1180 // If we are outside of the 'std' module, resolve imports from within 'std'
1181 // to the vendor directory.
1182 //
1183 // Do the same for importers beginning with the prefix 'vendor/' even if we
1184 // are *inside* of the 'std' module: the 'vendor/' packages that resolve
1185 // globally from GOROOT/src/vendor (and are listed as part of 'go list std')
1186 // are distinct from the real module dependencies, and cannot import
1187 // internal packages from the real module.
1188 //
1189 // (Note that although the 'vendor/' packages match the 'std' *package*
1190 // pattern, they are not part of the std *module*, and do not affect
1191 // 'go mod tidy' and similar module commands when working within std.)
1192 vendorPath := pathpkg.Join("vendor", path)
1193 if _, err := os.Stat(filepath.Join(cfg.GOROOTsrc, filepath.FromSlash(vendorPath))); err == nil {
1194 return vendorPath
1195 }
1196 }
1197
1198 // Not vendored: resolve from modules.
1199 return path
1200}
181func (this TVDisplayInfo) Vendor() string {
182 ptr := C.TV_DEVICE_ID_T(this).vendor
183 return C.GoString(&ptr[0])
184}
64func opAlVendor(expr *CXExpression, fp int) {
65 //panic(CX_RUNTIME_NOT_IMPLEMENTED)
66 WriteString(fp, "CX_RUNTIME_NOT_IMPLEMENTED", expr.Outputs[0])
67}
108func (d *Device) SetVendor(vendor string) {
109 d.modelLock.Lock()
110 d.model.Manufacturer = vendor
111 d.modelLock.Unlock()
112}
39func FindVendor(fpath string, nest int) (string, bool) {
40 vdir := fpath
41 n := 0
42 for {
43 v := filepath.Join(vdir, "vendor")
44 _, err := os.Stat(v)
45 if err == nil {
46 return v, true
47 }
48 n++
49 if n > nest {
50 break
51 }
52 vdir = filepath.Dir(vdir)
53 }
54 return "", false
55}
420func getGoArray(typeName string) string {
421 return "[]" + typeName
422}

Related snippets