From f2414ab42434d4eefd59847bbaec6b4c5dd4f1b6 Mon Sep 17 00:00:00 2001 From: Antonis Kalipetis Date: Tue, 21 Nov 2023 18:07:12 +0200 Subject: [PATCH] Change service names to have dashes only Replaces undersores in service names with dashes, so that the network service (and other services) have URL compliant names --- .uspun/local/project.yaml | 2 -- Makefile | 2 +- internal/question/services.go | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 .uspun/local/project.yaml diff --git a/.uspun/local/project.yaml b/.uspun/local/project.yaml deleted file mode 100644 index 4c9fdcf..0000000 --- a/.uspun/local/project.yaml +++ /dev/null @@ -1,2 +0,0 @@ -id: tw5gby3cqpzoi -host: api.staging.plat.farm diff --git a/Makefile b/Makefile index 57afdab..2c5d1b1 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ test: generate ## Run unit tests .PHONY: lint lint: ## Run linter - command -v golangci-lint >/dev/null || go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest + command -v golangci-lint >/dev/null || go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.52 golangci-lint run --timeout=10m --verbose .PHONY: generate diff --git a/internal/question/services.go b/internal/question/services.go index f96e791..01cc73f 100644 --- a/internal/question/services.go +++ b/internal/question/services.go @@ -72,7 +72,7 @@ func (q *Services) Ask(ctx context.Context) error { } service := models.Service{ - Name: strings.ReplaceAll(serviceName.String(), "-", "_"), + Name: strings.ReplaceAll(serviceName.String(), "_", "-"), Type: models.ServiceType{ Name: serviceName.String(), Version: versions[0],