Skip to content

Commit c5ae13e

Browse files
authored
fix: use constants instead of string for directive names (#1050)
We should use the constant that we defined instead of a string in the switch statement.
1 parent 1e369aa commit c5ae13e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gazelle/config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,9 +166,9 @@ func (*swiftLang) Configure(c *config.Config, rel string, f *rule.File) {
166166

167167
for _, d := range f.Directives {
168168
switch d.Key {
169-
case "proto_strip_import_prefix":
169+
case protoStripImportPrefix:
170170
sc.StripImportPrefix = d.Value
171-
case "proto_import_prefix":
171+
case protoImportPrefix:
172172
sc.ImportPrefix = d.Value
173173
case swiftModuleNamingConventionDirective:
174174
if d.Value == "" {

0 commit comments

Comments
 (0)