1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
diff --git a/main.go b/main.go
index 897822f4e2e5ec3f75a4e0465c16a1e3fcf17fc0..8b22f43e0407c32e4b9fc2f0e2eceec185f748f2 100644
--- a/main.go
+++ b/main.go
@@ -18,8 +18,8 @@ "github.com/go-chi/chi/v5"
"github.com/go-chi/chi/v5/middleware"
"github.com/google/go-jsonnet"
"github.com/peterbourgon/ff/v3"
- "github.com/peterbourgon/ff/v3/ffyaml"
"github.com/yaronf/httpsign"
+ "go.jolheiser.com/ffjsonnet"
"gopkg.in/yaml.v3"
)
@@ -37,7 +37,7 @@
func maine() error {
var args args
fs := flag.NewFlagSet("jsonnetpecker", flag.ExitOnError)
- fs.String("config", ".config.yaml", "Path to config file")
+ fs.String("config", ".config.jsonnet", "Path to config file")
fs.IntVar(&args.port, "port", args.port, "Port to listen on")
fs.IntVar(&args.port, "p", args.port, "--port")
fs.StringVar(&args.pubKey, "public-key", args.pubKey, "Woodpecker public key for verification")
@@ -66,7 +66,7 @@ fs.BoolVar(&args.logJSON, "j", args.logJSON, "--json")
if err := ff.Parse(fs, os.Args[1:],
ff.WithConfigFileFlag("config"),
ff.WithAllowMissingConfigFile(true),
- ff.WithConfigFileParser(ffyaml.Parser),
+ ff.WithConfigFileParser(ffjsonnet.Parser),
ff.WithEnvVarPrefix("JSONNETPECKER"),
); err != nil {
return err
|