-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package list | ||
|
||
import ( | ||
"fmt" | ||
"slices" | ||
|
||
"migrate/kdvh" | ||
) | ||
|
||
type Config struct { | ||
System string `short:"d" long:"db" default:"all" choice:"kdvh" choice:"kvlaobs" choice:"all" description:"Name of the database you want to dump data from"` | ||
} | ||
|
||
func (config *Config) Execute(_ []string) error { | ||
if config.System == "kdvh" || config.System == "all" { | ||
fmt.Println("Available tables in KDVH:") | ||
|
||
var tables []string | ||
for table := range kdvh.Init().Tables { | ||
tables = append(tables, table) | ||
} | ||
|
||
slices.Sort(tables) | ||
for _, table := range tables { | ||
fmt.Println(" -", table) | ||
} | ||
} | ||
|
||
if config.System == "kvalobs" || config.System == "all" { | ||
// TODO | ||
} | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters