@@ -139,16 +139,16 @@ func RegisterAndFetchProtos(ctx context.Context, client *github.Client, protoSch
139139 // or in other words, we treat "workflows/" folder as the root folder for all protos in this schema set and strip it from the paths derived from the repository structure.
140140 prefixesToStrip := determineFolderPrefixesToStrip (protoSchemaSet .Folders )
141141
142- strippeProtdMap := make (map [string ]string )
142+ strippedProtdMap := make (map [string ]string )
143143 strippedSubjects := make (map [string ]string )
144144
145145 for path := range protoMap {
146146 strippedPath := stripFolderPrefix (path , prefixesToStrip )
147- strippeProtdMap [strippedPath ] = protoMap [path ]
147+ strippedProtdMap [strippedPath ] = protoMap [path ]
148148 strippedSubjects [strippedPath ] = subjects [path ]
149149 }
150150
151- registerErr := registerAllWithTopologicalSorting (schemaRegistryURL , strippeProtdMap , strippedSubjects )
151+ registerErr := registerAllWithTopologicalSorting (schemaRegistryURL , strippedProtdMap , strippedSubjects )
152152 if registerErr != nil {
153153 return errors .Wrapf (registerErr , "failed to register protos from %s" , protoSchemaSet .URI )
154154 }
@@ -175,7 +175,7 @@ func DefaultSubjectNamingStrategy(subjectPrefix string, proto protoFile, protoSc
175175// extractPackageNameWithRegex extracts the package name from a proto source file using regex.
176176// It returns an error if no package name is found.
177177func extractPackageNameWithRegex (protoSrc string ) (string , error ) {
178- matches := regexp .MustCompile (`(?m)^\s*package\s+([a-zA-_Z0 -9.]+)\s*;` ).FindStringSubmatch (protoSrc )
178+ matches := regexp .MustCompile (`(?m)^\s*package\s+([a-zA-Z0 -9._ ]+)\s*;` ).FindStringSubmatch (protoSrc )
179179 if len (matches ) < 2 {
180180 return "" , fmt .Errorf ("no package name found in proto source" )
181181 }
0 commit comments