From 77b40167bd34baea3301f63719da879f3dcf1daa Mon Sep 17 00:00:00 2001 From: Aleksandar Stojanov Date: Thu, 2 Nov 2023 17:53:24 +0100 Subject: [PATCH] fix golang lint errors Signed-off-by: Aleksandar Stojanov --- codecov.yml | 2 +- schema.go | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/codecov.yml b/codecov.yml index 11d4fdd..9f57ac0 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,6 +1,6 @@ coverage: precision: 2 round: nearest - range: 50...75 + range: 50...70 comment: require_changes: true diff --git a/schema.go b/schema.go index 3339940..fd151b8 100644 --- a/schema.go +++ b/schema.go @@ -117,11 +117,11 @@ func parseFlags(progname string, args []string) (config *Config, output string, } // Generate JSON schema -func generateJsonSchema(config *Config) error { +func generateJsonSchema(config *Config) { // Check if the input flag is set if len(config.input) == 0 { fmt.Fprintln(os.Stderr, "Input flag is required. Please provide input yaml files using the -input flag.") - return nil + os.Exit(2) } var schemaUrl string @@ -164,8 +164,6 @@ func generateJsonSchema(config *Config) error { if err != nil { fmt.Printf("Error: %v\n", err) } - - return nil } func main() {