Skip to content

Conversation

@shogo82148
Copy link
Contributor

Issue #, if available:

It fixes the following staticcheck warning.

events/codedeploy.go:16:2: SA9004: only the first constant in this group has an explicit type (staticcheck)
	CodeDeployDeploymentStateFailure CodeDeployDeploymentState = "FAILURE"
	^

The warning is shown because CodeDeployDeploymentState constants have unexpected type.

package main

import (
	"fmt"

	"github.com/aws/aws-lambda-go/events"
)

func main() {
	fmt.Printf("%10[1]s: %[1]T\n", events.CodeDeployDeploymentStateFailure)
	fmt.Printf("%10[1]s: %[1]T\n", events.CodeDeployDeploymentStateReady)
	fmt.Printf("%10[1]s: %[1]T\n", events.CodeDeployDeploymentStateStart)
	fmt.Printf("%10[1]s: %[1]T\n", events.CodeDeployDeploymentStateStop)
	fmt.Printf("%10[1]s: %[1]T\n", events.CodeDeployDeploymentStateSuccess)
}

got:

   FAILURE: events.CodeDeployDeploymentState
     READY: string
     START: string
      STOP: string
   SUCCESS: string

want:

   FAILURE: events.CodeDeployDeploymentState
     READY: events.CodeDeployDeploymentState
     START: events.CodeDeployDeploymentState
      STOP: events.CodeDeployDeploymentState
   SUCCESS: events.CodeDeployDeploymentState

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@codecov-commenter
Copy link

codecov-commenter commented Sep 19, 2020

Codecov Report

Merging #322 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #322   +/-   ##
=======================================
  Coverage   72.46%   72.46%           
=======================================
  Files          18       18           
  Lines         730      730           
=======================================
  Hits          529      529           
  Misses        136      136           
  Partials       65       65           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d520080...61efc90. Read the comment docs.

@bmoffatt bmoffatt merged commit b0cb7b2 into aws:master Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants