Skip to content

fix: correct AddBgRGB godoc and tighten both RGB examples#287

Open
c-tonneslan wants to merge 1 commit into
fatih:mainfrom
c-tonneslan:fix/addbgrgb-doc
Open

fix: correct AddBgRGB godoc and tighten both RGB examples#287
c-tonneslan wants to merge 1 commit into
fatih:mainfrom
c-tonneslan:fix/addbgrgb-doc

Conversation

@c-tonneslan

Copy link
Copy Markdown

The godoc for AddBgRGB starts with "AddRGB", which made it look like a copy of the AddRGB doc. The example in both (`.Add(34, 0, 12).Add(255, 128, 0)`) also doesn't compile as written, since AddRGB/AddBgRGB take three ints, not a chain of Add(...) calls.

Cleaned both docstrings up so the names match the methods they describe and the examples are actually valid Go.

Test plan

go build ./...
go test ./...

No behavior change, comments only.

The AddBgRGB docstring started with "AddRGB", which made it look like a
copy of the AddRGB doc. Both examples (.Add(34, 0, 12).Add(255, 128, 0))
also didn't show a realistic call, since the methods take three ints,
not a chain of Add(...) calls.

Cleaned both up so the names match and the examples actually compile.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
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.

1 participant