Skip to content

Commit baab6c3

Browse files
committed
Flatten configuration keys of importer-csv in config file.
1 parent ab7b4c2 commit baab6c3

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

cmd/importer-csv/config.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
graphkb:
2-
url: "http://localhost:8080"
3-
auth_token: "importer-csv"
4-
skip_verify: true
1+
graphkb_url: "http://localhost:8080"
2+
graphkb_auth_token: "importer-csv"
3+
graphkb_skip_verify: true
54

65
path: "example.csv"

cmd/importer-csv/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ func main() {
100100
Run: func(cmd *cobra.Command, args []string) {
101101

102102
options := graphkb.ImporterOptions{
103-
URL: viper.GetString("graphkb.url"),
104-
AuthToken: viper.GetString("graphkb.auth_token"),
105-
SkipVerify: viper.GetBool("graphkb.skip_verify"),
103+
URL: viper.GetString("graphkb_url"),
104+
AuthToken: viper.GetString("graphkb_auth_token"),
105+
SkipVerify: viper.GetBool("graphkb_skip_verify"),
106106
}
107107

108108
if err := graphkb.Start(NewCSVSource(), options); err != nil {

0 commit comments

Comments
 (0)