Build fix.
This commit is contained in:
parent
471bddcaf5
commit
f34c5e7fe8
2 changed files with 10 additions and 9 deletions
|
|
@ -28,10 +28,9 @@ jobs:
|
||||||
command: |
|
command: |
|
||||||
go get github.com/google/uuid
|
go get github.com/google/uuid
|
||||||
go get github.com/lib/pq
|
go get github.com/lib/pq
|
||||||
|
|
||||||
go get github.com/pkg/profile
|
go get github.com/pkg/profile
|
||||||
go get gotest.tools/assert
|
go get gotest.tools/assert
|
||||||
go get github.com/onsi/ginkgo
|
|
||||||
go get github.com/onsi/gomega
|
|
||||||
go get github.com/davecgh/go-spew/spew
|
go get github.com/davecgh/go-spew/spew
|
||||||
go get github.com/jstemmer/go-junit-report
|
go get github.com/jstemmer/go-junit-report
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,15 +9,17 @@ func ToGoIdentifier(databaseIdentifier string) string {
|
||||||
if len(databaseIdentifier) == 0 {
|
if len(databaseIdentifier) == 0 {
|
||||||
return databaseIdentifier
|
return databaseIdentifier
|
||||||
}
|
}
|
||||||
databaseIdentifier = strings.ReplaceAll(databaseIdentifier, " ", "_")
|
|
||||||
databaseIdentifier = strings.ReplaceAll(databaseIdentifier, "-", "_")
|
|
||||||
|
|
||||||
return snaker.SnakeToCamel(databaseIdentifier)
|
return snaker.SnakeToCamel(replaceInvalidChars(databaseIdentifier))
|
||||||
}
|
}
|
||||||
|
|
||||||
func ToGoFileName(databaseIdentifier string) string {
|
func ToGoFileName(databaseIdentifier string) string {
|
||||||
databaseIdentifier = strings.ReplaceAll(databaseIdentifier, " ", "_")
|
return strings.ToLower(replaceInvalidChars(databaseIdentifier))
|
||||||
databaseIdentifier = strings.ReplaceAll(databaseIdentifier, "-", "_")
|
}
|
||||||
|
|
||||||
return strings.ToLower(databaseIdentifier)
|
func replaceInvalidChars(str string) string {
|
||||||
|
str = strings.Replace(str, " ", "_", -1)
|
||||||
|
str = strings.Replace(str, "-", "_", -1)
|
||||||
|
|
||||||
|
return str
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue