mirror of
https://github.com/wader/fq.git
synced 2024-12-23 05:13:30 +03:00
Update github-go-version from 1.17.7, 1.17.7, 1.17.7 to 1.18.0
Replace strings.Title and and fix deprecation warning
This commit is contained in:
parent
57377e8fc6
commit
e5f61e22e9
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.17.7
|
||||
go-version: 1.18.0
|
||||
- uses: actions/checkout@v3
|
||||
- uses: golangci/golangci-lint-action@v3
|
||||
with:
|
||||
@ -47,7 +47,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.17.7
|
||||
go-version: 1.18.0
|
||||
- name: Test
|
||||
env:
|
||||
GOARCH: ${{ matrix.goarch }}
|
||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: 1.17.7
|
||||
go-version: 1.18.0
|
||||
- uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
distribution: goreleaser
|
||||
|
@ -69,6 +69,13 @@ func findDefintion(docs []Documentation) (string, bool) {
|
||||
return "", false
|
||||
}
|
||||
|
||||
func title(s string) string {
|
||||
if len(s) <= 1 {
|
||||
return s
|
||||
}
|
||||
return strings.ToUpper(s[0:1]) + s[1:]
|
||||
}
|
||||
|
||||
func main() {
|
||||
xmlPath := os.Args[1]
|
||||
r, err := os.Open(xmlPath)
|
||||
@ -135,7 +142,7 @@ func main() {
|
||||
if defOk {
|
||||
fmt.Printf("\t\tDefinition: %q,\n", def)
|
||||
}
|
||||
fmt.Printf("\t\tType: ebml.%s%s,\n", strings.Title(typ), extra)
|
||||
fmt.Printf("\t\tType: ebml.%s%s,\n", title(typ), extra)
|
||||
if len(c.Enums) > 0 {
|
||||
switch c.Type {
|
||||
case "integer":
|
||||
|
Loading…
Reference in New Issue
Block a user