Skip to content

Fix golint warnings for builder#14790

Merged
LK4D4 merged 1 commit intomoby:masterfrom
hqhq:hq_golint_build
Jul 22, 2015
Merged

Fix golint warnings for builder#14790
LK4D4 merged 1 commit intomoby:masterfrom
hqhq:hq_golint_build

Conversation

@hqhq
Copy link
Contributor

@hqhq hqhq commented Jul 21, 2015

Addresses: #14756

Signed-off-by: Qiang Huang h.huangqiang@huawei.com

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't we call it just Flags so it will be builder.Flags? and also the functions below like NewFlags instead of NewBFlags etc etc (and filename to just builder/flag.go :))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we have bflag.go, I thought we already consider bflag for short of buildflag, and bflag would be more meaningful than just flag. Personally I don't like that common word as a variable or method's name, it's painful when we jump between these tags 😞

If you insist, I surely can change the name 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about FlagSet?
bikeshed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to agree with @hqhq - having 'b' or something (like "builder") in there to make it clear its not the same "flags" as the cmd line stuff is useful. But no biggie either way.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@duglin That's the point of the doc string :)

@runcom
Copy link
Member

runcom commented Jul 21, 2015

@hqhq there's some failings in builder unit tests

@hqhq
Copy link
Contributor Author

hqhq commented Jul 21, 2015

@runcom Fixed, all green now 😄

builder/bflag.go Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/containers/contains/

@hqhq
Copy link
Contributor Author

hqhq commented Jul 22, 2015

@runcom @cpuguy83 @duglin Updated.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/define constant/Define constants/

@hqhq hqhq force-pushed the hq_golint_build branch from 846f229 to 01e9eaf Compare July 22, 2015 02:52
@hqhq
Copy link
Contributor Author

hqhq commented Jul 22, 2015

@duglin Thanks, updated.

@duglin
Copy link
Contributor

duglin commented Jul 22, 2015

LGTM

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure this should be private. Let's fix this. Then you don't need docstring at all :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, didn't check it.

Addresses: moby#14756

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
@hqhq hqhq force-pushed the hq_golint_build branch from 01e9eaf to 8c4a282 Compare July 22, 2015 06:25
@hqhq
Copy link
Contributor Author

hqhq commented Jul 22, 2015

@LK4D4 updated, thanks.

@LK4D4
Copy link
Contributor

LK4D4 commented Jul 22, 2015

LGTM

LK4D4 added a commit that referenced this pull request Jul 22, 2015
Fix golint warnings for builder
@LK4D4 LK4D4 merged commit a751c0a into moby:master Jul 22, 2015
@hqhq hqhq deleted the hq_golint_build branch July 23, 2015 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants