Skip to content

Commit

Permalink
feat(cmd/server): Load YAML config directly (no need for yq anymore)
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejsika committed Sep 4, 2023
1 parent 4054ae2 commit 642277b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/server/server.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package server

import (
"encoding/json"
"io/ioutil"
"log"

"github.com/sikalabs/signpost/cmd/root"
"github.com/sikalabs/signpost/pkg/server"
"github.com/spf13/cobra"
"gopkg.in/yaml.v3"
)

var FlagConfigFile string
Expand All @@ -24,7 +24,7 @@ var Cmd = &cobra.Command{
if err != nil {
log.Fatal(err)
}
err = json.Unmarshal(configFileBytes, &config)
err = yaml.Unmarshal(configFileBytes, &config)
if err != nil {
log.Fatal(err)
}
Expand Down

0 comments on commit 642277b

Please sign in to comment.