From 70e7e0d25a4ed97f7c227713466397a5e06643a1 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Sun, 1 Mar 2020 20:05:33 +0000 Subject: [PATCH] Apply gofmt Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- cmd/up.go | 24 ++++++++++++------------ pkg/provider/handlers/delete.go | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/cmd/up.go b/cmd/up.go index 326597c..590cf81 100644 --- a/cmd/up.go +++ b/cmd/up.go @@ -173,7 +173,7 @@ func makeServiceDefinitions(archSuffix string) []pkg.Service { wd, _ := os.Getwd() return []pkg.Service{ - pkg.Service{ + { Name: "basic-auth-plugin", Image: "docker.io/openfaas/basic-auth-plugin:0.18.10" + archSuffix, Env: []string{ @@ -183,11 +183,11 @@ func makeServiceDefinitions(archSuffix string) []pkg.Service { "pass_filename=basic-auth-password", }, Mounts: []pkg.Mount{ - pkg.Mount{ + { Src: path.Join(path.Join(wd, "secrets"), "basic-auth-password"), Dest: path.Join(containerSecretMountDir, "basic-auth-password"), }, - pkg.Mount{ + { Src: path.Join(path.Join(wd, "secrets"), "basic-auth-user"), Dest: path.Join(containerSecretMountDir, "basic-auth-user"), }, @@ -195,26 +195,26 @@ func makeServiceDefinitions(archSuffix string) []pkg.Service { Caps: []string{"CAP_NET_RAW"}, Args: nil, }, - pkg.Service{ + { Name: "nats", Env: []string{""}, Image: "docker.io/library/nats-streaming:0.11.2", Caps: []string{}, Args: []string{"/nats-streaming-server", "-m", "8222", "--store=memory", "--cluster_id=faas-cluster"}, }, - pkg.Service{ + { Name: "prometheus", Env: []string{}, Image: "docker.io/prom/prometheus:v2.14.0", Mounts: []pkg.Mount{ - pkg.Mount{ + { Src: path.Join(wd, "prometheus.yml"), Dest: "/etc/prometheus/prometheus.yml", }, }, Caps: []string{"CAP_NET_RAW"}, }, - pkg.Service{ + { Name: "gateway", Env: []string{ "basic_auth=true", @@ -232,18 +232,18 @@ func makeServiceDefinitions(archSuffix string) []pkg.Service { }, Image: "docker.io/openfaas/gateway:0.18.8" + archSuffix, Mounts: []pkg.Mount{ - pkg.Mount{ + { Src: path.Join(path.Join(wd, "secrets"), "basic-auth-password"), Dest: path.Join(containerSecretMountDir, "basic-auth-password"), }, - pkg.Mount{ + { Src: path.Join(path.Join(wd, "secrets"), "basic-auth-user"), Dest: path.Join(containerSecretMountDir, "basic-auth-user"), }, }, Caps: []string{"CAP_NET_RAW"}, }, - pkg.Service{ + { Name: "queue-worker", Env: []string{ "faas_nats_address=nats", @@ -258,11 +258,11 @@ func makeServiceDefinitions(archSuffix string) []pkg.Service { }, Image: "docker.io/openfaas/queue-worker:0.9.0", Mounts: []pkg.Mount{ - pkg.Mount{ + { Src: path.Join(path.Join(wd, "secrets"), "basic-auth-password"), Dest: path.Join(containerSecretMountDir, "basic-auth-password"), }, - pkg.Mount{ + { Src: path.Join(path.Join(wd, "secrets"), "basic-auth-user"), Dest: path.Join(containerSecretMountDir, "basic-auth-user"), }, diff --git a/pkg/provider/handlers/delete.go b/pkg/provider/handlers/delete.go index 18a6289..b79276c 100644 --- a/pkg/provider/handlers/delete.go +++ b/pkg/provider/handlers/delete.go @@ -8,12 +8,12 @@ import ( "log" "net/http" - cninetwork "github.com/openfaas/faasd/pkg/cninetwork" - "github.com/openfaas/faasd/pkg/service" "github.com/containerd/containerd" "github.com/containerd/containerd/namespaces" gocni "github.com/containerd/go-cni" "github.com/openfaas/faas/gateway/requests" + cninetwork "github.com/openfaas/faasd/pkg/cninetwork" + "github.com/openfaas/faasd/pkg/service" ) func MakeDeleteHandler(client *containerd.Client, cni gocni.CNI) func(w http.ResponseWriter, r *http.Request) {