user_agent icon indicating copy to clipboard operation
user_agent copied to clipboard

Browser type exported (public), does it need to be?

Open aren55555 opened this issue 4 years ago • 0 comments

Description

I found this library (appreciate your OSS contribution) and was looking thru the GoDoc to gain an understanding of the package's API structure.

I was wondering about the Browser type. It's part of the public API, it doesn't seem to be exposed by any of the public functions or as a public field of the other exported types. To me, it appears that this type should not be exported, and should be renamed from Browser to browser.

It's also possible that perhaps that the receiver method:

func (p *UserAgent) Browser() (string, string)

Should instead be exposed as:

func (p *UserAgent) Browser() Browser

What do you think?

aren55555 avatar Jan 06 '21 22:01 aren55555