From 9ef25a45e3575f6e7919005a969ba51b59d33ef9 Mon Sep 17 00:00:00 2001 From: Raphael Simon Date: Mon, 8 Jul 2024 14:59:19 -0700 Subject: [PATCH] Address linter issue (#3555) --- codegen/example/templates/server_handler.go.tpl | 2 +- codegen/example/testdata/server-no-server.golden | 2 +- codegen/example/testdata/server-same-api-service-name.golden | 2 +- codegen/example/testdata/server-sercice-for-only-grpc.golden | 2 +- .../testdata/server-server-hosting-multiple-services.golden | 2 +- .../testdata/server-server-hosting-service-subset.golden | 2 +- .../server-server-hosting-service-with-file-server.golden | 2 +- .../testdata/server-service-for-http-and-part-of-grpc.golden | 2 +- codegen/example/testdata/server-service-for-only-http.golden | 2 +- codegen/example/testdata/server-service-name-with-spaces.golden | 2 +- .../server-single-server-multiple-hosts-with-variables.golden | 2 +- .../example/testdata/server-single-server-multiple-hosts.golden | 2 +- .../server-single-server-single-host-with-variables.golden | 2 +- .../example/testdata/server-single-server-single-host.golden | 2 +- 14 files changed, 14 insertions(+), 14 deletions(-) diff --git a/codegen/example/templates/server_handler.go.tpl b/codegen/example/templates/server_handler.go.tpl index 82a84121ea..6b2eaf4038 100644 --- a/codegen/example/templates/server_handler.go.tpl +++ b/codegen/example/templates/server_handler.go.tpl @@ -50,5 +50,5 @@ {{ end }} {{- end }} default: - log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: {{ join .Server.AvailableHosts "|" }})\n", *hostF)) + log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: {{ join .Server.AvailableHosts "|" }})", *hostF)) } \ No newline at end of file diff --git a/codegen/example/testdata/server-no-server.golden b/codegen/example/testdata/server-no-server.golden index 097881aaca..8d6ed8fba7 100644 --- a/codegen/example/testdata/server-no-server.golden +++ b/codegen/example/testdata/server-no-server.golden @@ -109,7 +109,7 @@ func main() { } default: - log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: localhost)\n", *hostF)) + log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: localhost)", *hostF)) } // Wait for signal. diff --git a/codegen/example/testdata/server-same-api-service-name.golden b/codegen/example/testdata/server-same-api-service-name.golden index c9039e1525..30462fadc0 100644 --- a/codegen/example/testdata/server-same-api-service-name.golden +++ b/codegen/example/testdata/server-same-api-service-name.golden @@ -109,7 +109,7 @@ func main() { } default: - log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: localhost)\n", *hostF)) + log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: localhost)", *hostF)) } // Wait for signal. diff --git a/codegen/example/testdata/server-sercice-for-only-grpc.golden b/codegen/example/testdata/server-sercice-for-only-grpc.golden index 0bdea12962..37d920f66a 100644 --- a/codegen/example/testdata/server-sercice-for-only-grpc.golden +++ b/codegen/example/testdata/server-sercice-for-only-grpc.golden @@ -85,7 +85,7 @@ func main() { } default: - log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: localhost)\n", *hostF)) + log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: localhost)", *hostF)) } // Wait for signal. diff --git a/codegen/example/testdata/server-server-hosting-multiple-services.golden b/codegen/example/testdata/server-server-hosting-multiple-services.golden index fb2c9f997b..50ff33ea91 100644 --- a/codegen/example/testdata/server-server-hosting-multiple-services.golden +++ b/codegen/example/testdata/server-server-hosting-multiple-services.golden @@ -115,7 +115,7 @@ func main() { } default: - log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: dev)\n", *hostF)) + log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: dev)", *hostF)) } // Wait for signal. diff --git a/codegen/example/testdata/server-server-hosting-service-subset.golden b/codegen/example/testdata/server-server-hosting-service-subset.golden index 03b9901ab7..ee3a68a010 100644 --- a/codegen/example/testdata/server-server-hosting-service-subset.golden +++ b/codegen/example/testdata/server-server-hosting-service-subset.golden @@ -109,7 +109,7 @@ func main() { } default: - log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: dev)\n", *hostF)) + log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: dev)", *hostF)) } // Wait for signal. diff --git a/codegen/example/testdata/server-server-hosting-service-with-file-server.golden b/codegen/example/testdata/server-server-hosting-service-with-file-server.golden index 35ce69cd35..7c53ba3673 100644 --- a/codegen/example/testdata/server-server-hosting-service-with-file-server.golden +++ b/codegen/example/testdata/server-server-hosting-service-with-file-server.golden @@ -65,7 +65,7 @@ func main() { } default: - log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: svc)\n", *hostF)) + log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: svc)", *hostF)) } // Wait for signal. diff --git a/codegen/example/testdata/server-service-for-http-and-part-of-grpc.golden b/codegen/example/testdata/server-service-for-http-and-part-of-grpc.golden index 6ec133cc4f..9d052dacb3 100644 --- a/codegen/example/testdata/server-service-for-http-and-part-of-grpc.golden +++ b/codegen/example/testdata/server-service-for-http-and-part-of-grpc.golden @@ -115,7 +115,7 @@ func main() { } default: - log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: localhost)\n", *hostF)) + log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: localhost)", *hostF)) } // Wait for signal. diff --git a/codegen/example/testdata/server-service-for-only-http.golden b/codegen/example/testdata/server-service-for-only-http.golden index 581673275d..b50a52e17e 100644 --- a/codegen/example/testdata/server-service-for-only-http.golden +++ b/codegen/example/testdata/server-service-for-only-http.golden @@ -84,7 +84,7 @@ func main() { } default: - log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: localhost)\n", *hostF)) + log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: localhost)", *hostF)) } // Wait for signal. diff --git a/codegen/example/testdata/server-service-name-with-spaces.golden b/codegen/example/testdata/server-service-name-with-spaces.golden index b7a92773e4..cd3eeee20e 100644 --- a/codegen/example/testdata/server-service-name-with-spaces.golden +++ b/codegen/example/testdata/server-service-name-with-spaces.golden @@ -109,7 +109,7 @@ func main() { } default: - log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: svc)\n", *hostF)) + log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: svc)", *hostF)) } // Wait for signal. diff --git a/codegen/example/testdata/server-single-server-multiple-hosts-with-variables.golden b/codegen/example/testdata/server-single-server-multiple-hosts-with-variables.golden index 74f9b9d734..0be79fe580 100644 --- a/codegen/example/testdata/server-single-server-multiple-hosts-with-variables.golden +++ b/codegen/example/testdata/server-single-server-multiple-hosts-with-variables.golden @@ -127,7 +127,7 @@ func main() { } default: - log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: dev|stage)\n", *hostF)) + log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: dev|stage)", *hostF)) } // Wait for signal. diff --git a/codegen/example/testdata/server-single-server-multiple-hosts.golden b/codegen/example/testdata/server-single-server-multiple-hosts.golden index 5762fccd5e..1752cb39b4 100644 --- a/codegen/example/testdata/server-single-server-multiple-hosts.golden +++ b/codegen/example/testdata/server-single-server-multiple-hosts.golden @@ -109,7 +109,7 @@ func main() { } default: - log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: dev|stage)\n", *hostF)) + log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: dev|stage)", *hostF)) } // Wait for signal. diff --git a/codegen/example/testdata/server-single-server-single-host-with-variables.golden b/codegen/example/testdata/server-single-server-single-host-with-variables.golden index 27e7481582..f0b480afe9 100644 --- a/codegen/example/testdata/server-single-server-single-host-with-variables.golden +++ b/codegen/example/testdata/server-single-server-single-host-with-variables.golden @@ -135,7 +135,7 @@ func main() { } default: - log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: dev)\n", *hostF)) + log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: dev)", *hostF)) } // Wait for signal. diff --git a/codegen/example/testdata/server-single-server-single-host.golden b/codegen/example/testdata/server-single-server-single-host.golden index 7ff7872562..57c0d3f245 100644 --- a/codegen/example/testdata/server-single-server-single-host.golden +++ b/codegen/example/testdata/server-single-server-single-host.golden @@ -157,7 +157,7 @@ func main() { } default: - log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: dev)\n", *hostF)) + log.Fatal(ctx, fmt.Errorf("invalid host argument: %q (valid hosts: dev)", *hostF)) } // Wait for signal.