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

This commit is contained in:
Romain Le Jeune
2023-06-01 15:15:37 +00:00
parent c4dc829e6d
commit 802f7dbc67
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)