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"
|
"github.com/coreos/go-omaha/omaha"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const (
|
||||||
|
defaultClientVersion = "go-omaha"
|
||||||
|
)
|
||||||
|
|
||||||
// Client supports managing multiple apps using a single server.
|
// Client supports managing multiple apps using a single server.
|
||||||
type Client struct {
|
type Client struct {
|
||||||
apiClient *httpClient
|
apiClient *httpClient
|
||||||
|
@ -53,7 +57,7 @@ func New(serverURL, userID string) (*Client, error) {
|
||||||
|
|
||||||
c := &Client{
|
c := &Client{
|
||||||
apiClient: newHTTPClient(),
|
apiClient: newHTTPClient(),
|
||||||
clientVersion: "go-omaha",
|
clientVersion: defaultClientVersion,
|
||||||
userID: userID,
|
userID: userID,
|
||||||
sessionID: uuid.NewV4().String(),
|
sessionID: uuid.NewV4().String(),
|
||||||
apps: make(map[string]*AppClient),
|
apps: make(map[string]*AppClient),
|
||||||
|
|
|
@ -60,7 +60,7 @@ func NewMachineClient(serverURL string) (*Client, error) {
|
||||||
|
|
||||||
c := &Client{
|
c := &Client{
|
||||||
apiClient: newHTTPClient(),
|
apiClient: newHTTPClient(),
|
||||||
clientVersion: "go-omaha",
|
clientVersion: defaultClientVersion,
|
||||||
userID: string(machineID),
|
userID: string(machineID),
|
||||||
sessionID: string(bootID),
|
sessionID: string(bootID),
|
||||||
isMachine: true,
|
isMachine: true,
|
||||||
|
|
Loading…
Reference in a new issue