MCPcopy Create free account
hub / github.com/bufbuild/buf / validateProtoModuleName

Function validateProtoModuleName

private/bufpkg/bufimage/validate.go:62–73  ·  view source on GitHub ↗
(protoModuleName *imagev1.ModuleName)

Source from the content-addressed store, hash-verified

60}
61
62func validateProtoModuleName(protoModuleName *imagev1.ModuleName) error {
63 if protoModuleName.GetRemote() == "" {
64 return errors.New("empty ModuleName.Remote")
65 }
66 if protoModuleName.GetOwner() == "" {
67 return errors.New("empty ModuleName.Owner")
68 }
69 if protoModuleName.GetRepository() == "" {
70 return errors.New("empty ModuleName.Repository")
71 }
72 return nil
73}

Callers 1

validateProtoModuleInfoFunction · 0.85

Calls 3

GetRepositoryMethod · 0.65
GetRemoteMethod · 0.45
GetOwnerMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…