mssola / user_agent

This project has been moved, check the README.md file!

Home Page:https://github.com/mssola/useragent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

aren55555 opened this issue · 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?