image: NewUniform doesn't have documentation #38739
Labels
Documentation
Issues describing a change to documentation.
FrozenDueToAge
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
The
image.NewUniform
function is exported and should have a comment per https://golang.org/doc/effective_go.html#commentary.This came up when I realized it's not clear whether it's better to write
image.NewUniform(c)
or&image.Uniform{c}
. I thought maybeimage.NewUniform
is deprecated likeimage.ZP
, but that's not the case given it doesn't even have a comment. But it's not easy to feel confident using an exported method in the Go standard library when it's not documented.https://blog.golang.org/image-draw prefers
&image.Uniform{c}
style, but it's also from 2011.NewUniform
was renamed fromNewColorImage
in 2011, so it has existed for quite a while./cc @nigeltao @robpike
The text was updated successfully, but these errors were encountered: