Compare commits

...

2 Commits

Author SHA1 Message Date
761e38fd8e
Add version to user agent 2021-02-13 18:42:47 -06:00
e0a658edf7
Minor change to library user agent 2021-02-13 18:42:07 -06:00
3 changed files with 17 additions and 2 deletions

View File

@ -13,7 +13,7 @@ import (
"time"
)
const defaultUserAgent = "go-lifx"
const defaultUserAgent = "lifx-go"
type (
Client struct {

View File

@ -6,14 +6,17 @@ import (
"fmt"
"os"
"path"
"strings"
lifx "git.kill0.net/chill9/lume"
"github.com/BurntSushi/toml"
)
const userAgent = "lume"
var userAgent string
func init() {
userAgent = initUserAgent()
RegisterCommand("help", Command{
Func: HelpCmd,
Flags: func() *flag.FlagSet {
@ -274,3 +277,12 @@ func getConfigPath() string {
return configPath
}
func initUserAgent() string {
var b strings.Builder
b.WriteString("lume")
b.WriteRune('/')
b.WriteString(Version)
return b.String()
}

3
cmd/version.go Normal file
View File

@ -0,0 +1,3 @@
package lumecmd
const Version = "0.1.0"