feat(GODT-2673): Use NoClient as UserAgent without any client connected and...

This commit is contained in:
Romain Le Jeune
2023-06-01 15:27:56 +00:00
parent fc06665d2b
commit 7f7e360cd7
9 changed files with 122 additions and 10 deletions

View File

@ -24,6 +24,10 @@ import (
"sync"
)
const DefaultUserAgent = "NoClient/0.0.1"
const DefaultVersion = "0.0.1"
const UnknownClient = "UnknownClient"
type UserAgent struct {
client, platform string
@ -81,7 +85,7 @@ func (ua *UserAgent) GetUserAgent() string {
if ua.client != "" {
client = ua.client
} else {
client = "NoClient/0.0.1"
client = DefaultUserAgent
}
return fmt.Sprintf("%v (%v)", client, ua.platform)