Skip to content

Commit

Permalink
fix: convert driver name while generate lang
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Aug 30, 2022
1 parent f551dc7 commit 41edac5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/auto_lang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
paths:
- 'drivers/**'
- 'internal/bootstrap/data/setting.go'
workflow_dispatch:

jobs:
auto_lang:
Expand Down
6 changes: 3 additions & 3 deletions cmd/lang.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ func convert(s string) string {
func generateDriversJson() {
drivers := make(Drivers)
drivers["drivers"] = make(KV[interface{}])
driverItemsMap := operations.GetDriverInfoMap()
for k, v := range driverItemsMap {
drivers["drivers"][k] = k
driverInfoMap := operations.GetDriverInfoMap()
for k, v := range driverInfoMap {
drivers["drivers"][k] = convert(k)
items := make(KV[interface{}])
for i := range v.Additional {
item := v.Additional[i]
Expand Down
4 changes: 2 additions & 2 deletions internal/driver/item.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ type IRootFolderId interface {
}

type RootFolderPath struct {
RootFolder string `json:"root_folder" required:"true" help:"root folder path"`
RootFolder string `json:"root_folder" required:"true" help:"Root folder path"`
}

type RootFolderId struct {
RootFolder string `json:"root_folder" required:"true" help:"root folder id"`
RootFolder string `json:"root_folder" required:"true" help:"Root folder id"`
}

func (r RootFolderPath) GetRootFolderPath() string {
Expand Down

0 comments on commit 41edac5

Please sign in to comment.