client: define default version as a constant
This commit is contained in:
parent
d40844181a
commit
c9e5a6a602
2 changed files with 6 additions and 2 deletions
|
@ -25,6 +25,10 @@ import (
|
|||
"github.com/coreos/go-omaha/omaha"
|
||||
)
|
||||
|
||||
const (
|
||||
defaultClientVersion = "go-omaha"
|
||||
)
|
||||
|
||||
// Client supports managing multiple apps using a single server.
|
||||
type Client struct {
|
||||
apiClient *httpClient
|
||||
|
@ -53,7 +57,7 @@ func New(serverURL, userID string) (*Client, error) {
|
|||
|
||||
c := &Client{
|
||||
apiClient: newHTTPClient(),
|
||||
clientVersion: "go-omaha",
|
||||
clientVersion: defaultClientVersion,
|
||||
userID: userID,
|
||||
sessionID: uuid.NewV4().String(),
|
||||
apps: make(map[string]*AppClient),
|
||||
|
|
|
@ -60,7 +60,7 @@ func NewMachineClient(serverURL string) (*Client, error) {
|
|||
|
||||
c := &Client{
|
||||
apiClient: newHTTPClient(),
|
||||
clientVersion: "go-omaha",
|
||||
clientVersion: defaultClientVersion,
|
||||
userID: string(machineID),
|
||||
sessionID: string(bootID),
|
||||
isMachine: true,
|
||||
|
|
Loading…
Reference in a new issue