Skip to content
This repository has been archived by the owner on May 9, 2021. It is now read-only.

Constants should be comentable in blocks #274

Closed
Tracked by #300
morriswinkler-simple opened this issue Feb 1, 2017 · 2 comments
Closed
Tracked by #300

Constants should be comentable in blocks #274

morriswinkler-simple opened this issue Feb 1, 2017 · 2 comments

Comments

@morriswinkler-simple
Copy link

morriswinkler-simple commented Feb 1, 2017

I am referring to #208

// Mobility is how you move on
type Mobility int

const (
	Lame  Mobility = iota // Immobile motion
	Car                   // Motion by car
	Plane                 // Motion by plane
	Ship                  // Motion by ship
)

const (
	// Immobile motion
	Lame2 Mobility = iota
	// Motion by car
	Car2
	// Motion by plane
	Plane2
	// Motion by ship
	Ship2
)

translate perfectly fine into godoc go version go1.7.4 darwin/amd64

generated with godoc
const (
    Lame  Mobility = iota // Immobile motion
    Car                   // Motion by car
    Plane                 // Motion by plane
    Ship                  // Motion by ship
)
const (
    // Immobile motion
    Lame2 Mobility = iota
    // Motion by car
    Car2
    // Motion by plane
    Plane2
    // Motion by ship
    Ship2
)
@puellanivis
Copy link

// Mobility is how you move on
type Mobility int

// Various kinds of Mobility
const (
	Lame  Mobility = iota
	Car
	Plane
	Ship
)

@mvdan
Copy link
Member

mvdan commented May 8, 2021

Thank you for submitting this issue! As per golang/go#38968, we are freezing and deprecating golint. There's no drop-in replacement to golint per se, but you should find that Staticcheck works well in encouraging good Go code, much like golint did in the past, since it also includes style checks. There's always gofmt and go vet too, of course.

If you would like to contribute further, I'd encourage you to engage Staticcheck's issue tracker or look at vet's open issues, as they are both actively maintained. If you have an idea that doesn't fit into either of those tools, you could look at other Go linters, or write your own - these days it's fairly straightforward with go/analysis.

To help avoid confusion, I'm closing all issues before we freeze the repository. If you have any feedback, you can leave a comment on the proposal thread where it was decided to deprecate golint - though note that the proposal has been accepted for nearly a year. Thanks!

@mvdan mvdan closed this as completed May 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants