Implement custom User-Agent string

Also a couple miscellaneous vet fixes
This commit is contained in:
Matthew Holt 2015-12-30 15:01:21 -07:00
parent fce9468e1e
commit 89908f39e9
8 changed files with 175 additions and 14 deletions

4
cli.go
View file

@ -6,6 +6,7 @@ import (
"path"
"github.com/codegangsta/cli"
"github.com/xenolf/lego/acme"
)
// Logger is used to log errors; if nil, the default log.Logger is used.
@ -20,12 +21,13 @@ func logger() *log.Logger {
}
func main() {
app := cli.NewApp()
app.Name = "lego"
app.Usage = "Let's encrypt client to go!"
app.Version = "0.1.0"
acme.UserAgent = "lego/" + app.Version
cwd, err := os.Getwd()
if err != nil {
logger().Fatal("Could not determine current working directory. Please pass --path.")