From 66271d5fe0b7c97d409b25d60afd421f579fde18 Mon Sep 17 00:00:00 2001 From: Karol Date: Tue, 14 Apr 2020 13:01:02 +0200 Subject: [PATCH] fix: string and other typos --- {.circleic => .circleci}/config.yml | 44 ++++++++++++++--------------- cmd/scheduler/cmd/restart.go | 2 +- cmd/scheduler/cmd/stop.go | 2 +- operator/gke.go | 2 +- operator/instance_group.go | 2 +- scheduler.go | 2 +- 6 files changed, 27 insertions(+), 27 deletions(-) rename {.circleic => .circleci}/config.yml (96%) diff --git a/.circleic/config.yml b/.circleci/config.yml similarity index 96% rename from .circleic/config.yml rename to .circleci/config.yml index 77fa789..bec0165 100644 --- a/.circleic/config.yml +++ b/.circleci/config.yml @@ -1,22 +1,22 @@ -# Golang CircleCI 2.0 configuration file -# -# Check https://circleci.com/docs/2.0/language-go/ for more details -version: 2 -jobs: - build: - docker: - - image: circleci/golang:1.12 - environment: - GO111MODULE: "ON" - working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}} - steps: - - checkout - - run: go mod download - - run: go test -v ./... - - restore_cache: - keys: - - go-mod-v1-{{ checksum "go.sum" }} - - save_cache: - key: go-mod-v1-{{ checksum "go.sum" }} - paths: - - "/go/pkg/mod" +# Golang CircleCI 2.0 configuration file +# +# Check https://circleci.com/docs/2.0/language-go/ for more details +version: 2 +jobs: + build: + docker: + - image: circleci/golang:1.12 + environment: + GO111MODULE: "ON" + working_directory: /go/src/github.com/{{ORG_NAME}}/{{REPO_NAME}} + steps: + - checkout + - run: go mod download + - run: go test -v ./... + - restore_cache: + keys: + - go-mod-v1-{{ checksum "go.sum" }} + - save_cache: + key: go-mod-v1-{{ checksum "go.sum" }} + paths: + - "/go/pkg/mod" diff --git a/cmd/scheduler/cmd/restart.go b/cmd/scheduler/cmd/restart.go index a40ed52..a4f0f18 100644 --- a/cmd/scheduler/cmd/restart.go +++ b/cmd/scheduler/cmd/restart.go @@ -22,7 +22,7 @@ var restartCmd = &cobra.Command{ log.Printf("Project ID: %v", projectID) if projectID == "" { - return errors.New("not found project variable") + return errors.New("project variable not found") } ctx, cancel := context.WithTimeout(context.Background(), time.Duration(timeout)*time.Second) diff --git a/cmd/scheduler/cmd/stop.go b/cmd/scheduler/cmd/stop.go index 02f0729..38cb7d8 100644 --- a/cmd/scheduler/cmd/stop.go +++ b/cmd/scheduler/cmd/stop.go @@ -22,7 +22,7 @@ var stopCmd = &cobra.Command{ log.Printf("Project ID: %v", projectID) if projectID == "" { - return errors.New("not found project variable") + return errors.New("project variable not found") } ctx, cancel := context.WithTimeout(context.Background(), time.Duration(timeout)*time.Second) diff --git a/operator/gke.go b/operator/gke.go index 8574796..65b6e50 100644 --- a/operator/gke.go +++ b/operator/gke.go @@ -283,7 +283,7 @@ func GetOriginalNodePoolSize(ctx context.Context, projectID, targetLabel, labelV } for _, url := range nodePool.InstanceGroupUrls { - // u;rl is below format + // url is below format // e.g. https://www.googleapis.com/compute/v1/projects/{ProjectID}/zones/us-central1-a/instanceGroupManagers/gke-standard-cluster-1-default-pool-1234abcd-grp urlSplit := strings.Split(url, "/") instanceGroupName := urlSplit[len(urlSplit)-1] diff --git a/operator/instance_group.go b/operator/instance_group.go index 3fcca6d..d6cfdbb 100644 --- a/operator/instance_group.go +++ b/operator/instance_group.go @@ -42,7 +42,7 @@ func InstanceGroup(ctx context.Context, projectID string) *InstanceGroupCall { return &InstanceGroupCall{error: err} } - // get all instance group mangers list + // get all instance group managers list managerList, err := compute.NewInstanceGroupManagersService(s).AggregatedList(projectID).Do() if err != nil { return &InstanceGroupCall{error: err} diff --git a/scheduler.go b/scheduler.go index 1899f35..578329e 100644 --- a/scheduler.go +++ b/scheduler.go @@ -38,7 +38,7 @@ func SwitchInstanceState(ctx context.Context, msg *pubsub.Message) error { var e Env if err := envconfig.Process("", &e); err != nil { - log.Printf("Error at the fucntion 'DecodeMessage': %v", err) + log.Printf("Error at the function 'DecodeMessage': %v", err) return err } if e.SlackNotify && (e.SlackToken == "" || e.SlackChannel == "") {