File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ func newPlugin() error {
143143 CredentialNameUpperCamelCase string
144144 CredentialNameSnakeCase string
145145 TestCredentialExample string
146+ ExecutableSnakeCase string
146147 }{}
147148
148149 err := survey .Ask (questionnaire , & result )
@@ -170,6 +171,7 @@ func newPlugin() error {
170171
171172 result .CredentialNameUpperCamelCase = strings .Join (credNameSplit , "" )
172173 result .CredentialNameSnakeCase = strings .ToLower (strings .Join (credNameSplit , "_" ))
174+ result .ExecutableSnakeCase = strings .ToLower (strings .ReplaceAll (result .Executable , "-" , "_" ))
173175
174176 result .IsNewCredentialName = true
175177 for _ , existing := range credname .ListAll () {
@@ -488,7 +490,7 @@ func Test{{ .CredentialNameUpperCamelCase }}Importer(t *testing.T) {
488490}
489491
490492var executableTemplate = Template {
491- Filename : "{{ .Executable }}.go" ,
493+ Filename : "{{ .ExecutableSnakeCase }}.go" ,
492494 Contents : `package {{ .Name }}
493495
494496import (
You can’t perform that action at this time.
0 commit comments