File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ var commentsByExt = map[string]string{
28
28
// this is a backwards incompatible change, and thus should be done for next project version.
29
29
".go" : "// " ,
30
30
".yaml" : "# " ,
31
+ ".yml" : "#" ,
31
32
// When adding additional file extensions, update also the NewMarkerFor documentation and error
32
33
}
33
34
@@ -38,14 +39,14 @@ type Marker struct {
38
39
}
39
40
40
41
// NewMarkerFor creates a new marker customized for the specific file
41
- // Supported file extensions: .go, .ext
42
+ // Supported file extensions: .go, .yaml, .yml
42
43
func NewMarkerFor (path string , value string ) Marker {
43
44
ext := filepath .Ext (path )
44
45
if comment , found := commentsByExt [ext ]; found {
45
46
return Marker {comment , value }
46
47
}
47
48
48
- panic (fmt .Errorf ("unknown file extension: '%s', expected '.go' or '.yaml '" , ext ))
49
+ panic (fmt .Errorf ("unknown file extension: '%s', expected '.go', '.yaml' or '.yml '" , ext ))
49
50
}
50
51
51
52
// String implements Stringer
You can’t perform that action at this time.
0 commit comments