diff --git a/internal/netxlite/certifi.go b/internal/netxlite/certifi.go index de84dab..89cda50 100644 --- a/internal/netxlite/certifi.go +++ b/internal/netxlite/certifi.go @@ -1,10 +1,10 @@ // Code generated by go generate; DO NOT EDIT. -// 2021-06-25 12:32:42.759674 +0200 CEST m=+0.458880709 +// 2021-07-02 14:26:19.300018 +0200 CEST m=+0.978891751 // https://curl.haxx.se/ca/cacert.pem package netxlite -//go:generate go run certifigen.go "https://curl.haxx.se/ca/cacert.pem" +//go:generate go run ./generator/ "https://curl.haxx.se/ca/cacert.pem" const pemcerts string = ` ## diff --git a/internal/netxlite/certifigen.go b/internal/netxlite/generator/main.go similarity index 83% rename from internal/netxlite/certifigen.go rename to internal/netxlite/generator/main.go index ad632b9..e2db888 100644 --- a/internal/netxlite/certifigen.go +++ b/internal/netxlite/generator/main.go @@ -1,5 +1,3 @@ -// +build ignore - // This Source Code Form is subject to the terms of the Mozilla Public // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. @@ -30,7 +28,7 @@ var tmpl = template.Must(template.New("").Parse(`// Code generated by go generat package netxlite -//go:generate go run certifigen.go "{{ .URL }}" +//{{ .GoGenerate }} go run ./generator/ "{{ .URL }}" const pemcerts string = ` + "`" + ` {{ .Bundle }} @@ -39,7 +37,7 @@ const pemcerts string = ` + "`" + ` func main() { if len(os.Args) != 2 || !strings.HasPrefix(os.Args[1], "https://") { - log.Fatal("usage: go run generate.go ") + log.Fatal("usage: go run ./generator/ ") } url := os.Args[1] @@ -68,13 +66,15 @@ func main() { } err = tmpl.Execute(fp, struct { - Timestamp time.Time - URL string - Bundle string + Bundle string + GoGenerate string + Timestamp time.Time + URL string }{ - Timestamp: time.Now(), - URL: url, - Bundle: string(bundle), + Bundle: string(bundle), + GoGenerate: "go:generate", + Timestamp: time.Now(), + URL: url, }) if err != nil { log.Fatal(err)