Esempio n. 1
0
package app

import (
	"fmt"
	"github.com/echocat/caretakerd"
	"github.com/echocat/caretakerd/defaults"
	"github.com/echocat/caretakerd/errors"
	"github.com/urfave/cli"
	"os"
)

var conf = NewConfigWrapper()
var defaultListenAddress = defaults.ListenAddress()
var defaultPemFile = defaults.AuthFileKeyFilename()
var listenAddress = NewFlagWrapper(&defaultListenAddress)
var pemFile = NewFlagWrapper(&defaultPemFile)

func init() {
	cli.AppHelpTemplate = `NAME:
   {{.Name}} - {{.Usage}}

USAGE:
   {{.HelpName}} {{if .Flags}}[global options]{{end}} command ...
{{if .Commands}}
COMMANDS:
   {{range .Commands}}{{join .Names ", "}}{{ "\t" }}{{.Usage}}
   {{end}}{{end}}{{if .Flags}}
GLOBAL OPTIONS:
   {{range .Flags}}{{.}}
   {{end}}{{end}}
`
Esempio n. 2
0
func (instance *Config) init() {
	(*instance).Access = access.NewGenerateToFileConfig(access.ReadWrite, defaults.AuthFileKeyFilename())
}