uber-go / guide

The Uber Go Style Guide.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible typo?

Megidd opened this issue · comments

In the section Avoid Naked Parameters, this example:

type Status int

const (
  StatusReady = iota + 1
  StatusDone
  // Maybe we will have a StatusInProgress in the future.
)

Shouldn't it be? :

type Status int

const (
  StatusReady Status = iota + 1 // Notice `Status` type here
  StatusDone
  // Maybe we will have a StatusInProgress in the future.
)

Yes, that's correct! Thanks for pointing this out. Feel free to open a PR fixing this - otherwise, we'll fix it in the next day or two.