diff --git a/go.mod b/go.mod index 95fcaa390a..1eb2df9c40 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/jedisct1/go-minisign v0.0.0-20210414164026-819d7e2534ac github.com/jedisct1/xsecretbox v0.0.0-20210330110434-7cb86b57caf0 github.com/k-sone/critbitgo v1.4.0 - github.com/kardianos/service v1.2.0 + github.com/kardianos/service v1.2.1 github.com/miekg/dns v1.1.43 github.com/powerman/check v1.5.0 golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e diff --git a/go.sum b/go.sum index 64b14c0dd3..ca315f7ad4 100644 --- a/go.sum +++ b/go.sum @@ -390,8 +390,8 @@ github.com/julz/importas v0.0.0-20210419104244-841f0c0fe66d/go.mod h1:oSFU2R4XK/ github.com/k-sone/critbitgo v1.4.0 h1:l71cTyBGeh6X5ATh6Fibgw3+rtNT80BA0uNNWgkPrbE= github.com/k-sone/critbitgo v1.4.0/go.mod h1:7E6pyoyADnFxlUBEKcnfS49b7SUAQGMK+OAp/UQvo0s= github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k= -github.com/kardianos/service v1.2.0 h1:bGuZ/epo3vrt8IPC7mnKQolqFeYJb7Cs8Rk4PSOBB/g= -github.com/kardianos/service v1.2.0/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM= +github.com/kardianos/service v1.2.1 h1:AYndMsehS+ywIS6RB9KOlcXzteWUzxgMgBymJD7+BYk= +github.com/kardianos/service v1.2.1/go.mod h1:CIMRFEJVL+0DS1a3Nx06NaMn4Dz63Ng6O7dl0qH0zVM= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.6.0 h1:YTDO4pNy7AUN/021p+JGHycQyYNIyMoenM1YDVK6RlY= diff --git a/vendor/github.com/hashicorp/hcl/.gitignore b/vendor/github.com/hashicorp/hcl/.gitignore index 822fa09f52..15586a2b54 100644 --- a/vendor/github.com/hashicorp/hcl/.gitignore +++ b/vendor/github.com/hashicorp/hcl/.gitignore @@ -1,9 +1,9 @@ -y.output - -# ignore intellij files -.idea -*.iml -*.ipr -*.iws - -*.test +y.output + +# ignore intellij files +.idea +*.iml +*.ipr +*.iws + +*.test diff --git a/vendor/github.com/hashicorp/hcl/Makefile b/vendor/github.com/hashicorp/hcl/Makefile index 9fafd5017c..84fd743f5c 100644 --- a/vendor/github.com/hashicorp/hcl/Makefile +++ b/vendor/github.com/hashicorp/hcl/Makefile @@ -1,18 +1,18 @@ -TEST?=./... - -default: test - -fmt: generate - go fmt ./... - -test: generate - go get -t ./... - go test $(TEST) $(TESTARGS) - -generate: - go generate ./... - -updatedeps: - go get -u golang.org/x/tools/cmd/stringer - -.PHONY: default generate test updatedeps +TEST?=./... + +default: test + +fmt: generate + go fmt ./... + +test: generate + go get -t ./... + go test $(TEST) $(TESTARGS) + +generate: + go generate ./... + +updatedeps: + go get -u golang.org/x/tools/cmd/stringer + +.PHONY: default generate test updatedeps diff --git a/vendor/github.com/kardianos/service/service.go b/vendor/github.com/kardianos/service/service.go index 91a6994457..e0ceaf3d00 100644 --- a/vendor/github.com/kardianos/service/service.go +++ b/vendor/github.com/kardianos/service/service.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // Package service provides a simple way to create a system service. -// Currently supports Windows, Linux/(systemd | Upstart | SysV), and OSX/Launchd. +// Currently supports Windows, Linux/(systemd | Upstart | SysV | OpenRC), and OSX/Launchd. // // Windows controls services by setting up callbacks that is non-trivial. This // is very different then other systems. This package provides the same API @@ -93,6 +93,7 @@ const ( optionSysvScript = "SysvScript" optionUpstartScript = "UpstartScript" optionLaunchdConfig = "LaunchdConfig" + optionOpenRCScript = "OpenRCScript" ) // Status represents service status as an byte value @@ -132,28 +133,6 @@ type Config struct { ChRoot string // System specific options. - // * OS X - // - LaunchdConfig string () - Use custom launchd config - // - KeepAlive bool (true) - // - RunAtLoad bool (false) - // - UserService bool (false) - Install as a current user service. - // - SessionCreate bool (false) - Create a full user session. - // * POSIX - // - SystemdScript string () - Use custom systemd script - // - UpstartScript string () - Use custom upstart script - // - SysvScript string () - Use custom sysv script - // - RunWait func() (wait for SIGNAL) - Do not install signal but wait for this function to return. - // - ReloadSignal string () [USR1, ...] - Signal to send on reaload. - // - PIDFile string () [/run/prog.pid] - Location of the PID file. - // - LogOutput bool (false) - Redirect StdErr & StandardOutPath to files. - // - Restart string (always) - How shall service be restarted. - // - SuccessExitStatus string () - The list of exit status that shall be considered as successful, - // in addition to the default ones. - // * Linux (systemd) - // - LimitNOFILE int - Maximum open files (ulimit -n) (https://serverfault.com/questions/628610/increasing-nproc-for-processes-launched-by-systemd-on-centos-7) - // * Windows - // - DelayedAutoStart bool (false) - after booting start this service after some delay - Option KeyValue } @@ -167,7 +146,7 @@ var ( ErrNameFieldRequired = errors.New("Config.Name field is required.") // ErrNoServiceSystemDetected is returned when no system was detected. ErrNoServiceSystemDetected = errors.New("No service system detected.") - // ErrNotInstalled is returned when the service is not installed + // ErrNotInstalled is returned when the service is not installed. ErrNotInstalled = errors.New("the service is not installed") ) @@ -182,8 +161,41 @@ func New(i Interface, c *Config) (Service, error) { return system.New(i, c) } -// KeyValue provides a list of platform specific options. See platform docs for -// more details. +// KeyValue provides a list of system specific options. +// * OS X +// - LaunchdConfig string () - Use custom launchd config. +// - KeepAlive bool (true) - Prevent the system from stopping the service automatically. +// - RunAtLoad bool (false) - Run the service after its job has been loaded. +// - SessionCreate bool (false) - Create a full user session. +// +// * Solaris +// - Prefix string ("application") - Service FMRI prefix. +// +// * POSIX +// - UserService bool (false) - Install as a current user service. +// - SystemdScript string () - Use custom systemd script. +// - UpstartScript string () - Use custom upstart script. +// - SysvScript string () - Use custom sysv script. +// - OpenRCScript string () - Use custom OpenRC script. +// - RunWait func() (wait for SIGNAL) - Do not install signal but wait for this function to return. +// - ReloadSignal string () [USR1, ...] - Signal to send on reload. +// - PIDFile string () [/run/prog.pid] - Location of the PID file. +// - LogOutput bool (false) - Redirect StdErr & StandardOutPath to files. +// - Restart string (always) - How shall service be restarted. +// - SuccessExitStatus string () - The list of exit status that shall be considered as successful, +// in addition to the default ones. +// * Linux (systemd) +// - LimitNOFILE int (-1) - Maximum open files (ulimit -n) +// (https://serverfault.com/questions/628610/increasing-nproc-for-processes-launched-by-systemd-on-centos-7) +// * Windows +// - DelayedAutoStart bool (false) - After booting, start this service after some delay. +// - Password string () - Password to use when interfacing with the system service manager. +// - Interactive bool (false) - The service can interact with the desktop. (more information https://docs.microsoft.com/en-us/windows/win32/services/interactive-services) +// - DelayedAutoStart bool (false) - after booting start this service after some delay. +// - StartType string ("automatic") - Start service type. (automatic | manual | disabled) +// - OnFailure string ("restart" ) - Action to perform on service failure. (restart | reboot | noaction) +// - OnFailureDelayDuration string ( "1s" ) - Delay before restarting the service, time.Duration string. +// - OnFailureResetPeriod int ( 10 ) - Reset period for errors, seconds. type KeyValue map[string]interface{} // bool returns the value of the given name, assuming the value is a boolean. diff --git a/vendor/github.com/kardianos/service/service_aix.go b/vendor/github.com/kardianos/service/service_aix.go index 5710b96e31..58f356d961 100644 --- a/vendor/github.com/kardianos/service/service_aix.go +++ b/vendor/github.com/kardianos/service/service_aix.go @@ -44,20 +44,17 @@ func (aixSystem) New(i Interface, c *Config) (Service, error) { return s, nil } -func getPidOfSvcMaster() int { - pat := regexp.MustCompile(`\s+root\s+(\d+)\s+\d+\s+\d+\s+\w+\s+\d+\s+\S+\s+[0-9:]+\s+/usr/sbin/srcmstr`) - cmd := exec.Command("ps", "-ef") +func getArgsFromPid(pid int) string { + cmd := exec.Command("ps", "-o", "args", "-p", strconv.Itoa(pid)) var out bytes.Buffer cmd.Stdout = &out - pid := 0 if err := cmd.Run(); err == nil { - matches := pat.FindAllStringSubmatch(out.String(), -1) - for _, match := range matches { - pid, _ = strconv.Atoi(match[1]) - break + lines := strings.Split(out.String(), "\n") + if len(lines) > 1 { + return strings.TrimSpace(lines[1]) } } - return pid + return "" } func init() { @@ -75,8 +72,8 @@ func init() { } func isInteractive() (bool, error) { - // The PPid of a service process should match PID of srcmstr. - return os.Getppid() != getPidOfSvcMaster(), nil + // The parent process of a service process should be srcmstr. + return getArgsFromPid(os.Getppid()) != "/usr/sbin/srcmstr", nil } type aixService struct { diff --git a/vendor/github.com/kardianos/service/service_darwin.go b/vendor/github.com/kardianos/service/service_darwin.go index 88e46ce8cc..237d790286 100644 --- a/vendor/github.com/kardianos/service/service_darwin.go +++ b/vendor/github.com/kardianos/service/service_darwin.go @@ -186,7 +186,7 @@ func (s *darwinLaunchdService) Uninstall() error { func (s *darwinLaunchdService) Status() (Status, error) { exitCode, out, err := runWithOutput("launchctl", "list", s.Name) if exitCode == 0 && err != nil { - if !strings.Contains(err.Error(), "failed with StandardError") { + if !strings.Contains(err.Error(), "failed with stderr") { return StatusUnknown, err } } diff --git a/vendor/github.com/kardianos/service/service_linux.go b/vendor/github.com/kardianos/service/service_linux.go index d0345466d9..49d3faee02 100644 --- a/vendor/github.com/kardianos/service/service_linux.go +++ b/vendor/github.com/kardianos/service/service_linux.go @@ -53,6 +53,15 @@ func init() { }, new: newUpstartService, }, + linuxSystemService{ + name: "linux-openrc", + detect: isOpenRC, + interactive: func() bool { + is, _ := isInteractive() + return is + }, + new: newOpenRCService, + }, linuxSystemService{ name: "unix-systemv", detect: func() bool { return true }, diff --git a/vendor/github.com/kardianos/service/service_openrc_linux.go b/vendor/github.com/kardianos/service/service_openrc_linux.go new file mode 100644 index 0000000000..8ae467f2be --- /dev/null +++ b/vendor/github.com/kardianos/service/service_openrc_linux.go @@ -0,0 +1,238 @@ +package service + +import ( + "bytes" + "errors" + "fmt" + "os" + "os/exec" + "os/signal" + "regexp" + "syscall" + "text/template" + "time" +) + +func isOpenRC() bool { + if _, err := exec.LookPath("openrc-init"); err == nil { + return true + } + if _, err := os.Stat("/etc/inittab"); err == nil { + filerc, err := os.Open("/etc/inittab") + if err != nil { + return false + } + defer filerc.Close() + + buf := new(bytes.Buffer) + buf.ReadFrom(filerc) + contents := buf.String() + + re := regexp.MustCompile(`::sysinit:.*openrc.*sysinit`) + matches := re.FindStringSubmatch(contents) + if len(matches) > 0 { + return true + } + return false + } + return false +} + +type openrc struct { + i Interface + platform string + *Config +} + +func (s *openrc) String() string { + if len(s.DisplayName) > 0 { + return s.DisplayName + } + return s.Name +} + +func (s *openrc) Platform() string { + return s.platform +} + +func (s *openrc) template() *template.Template { + customScript := s.Option.string(optionOpenRCScript, "") + + if customScript != "" { + return template.Must(template.New("").Funcs(tf).Parse(customScript)) + } else { + return template.Must(template.New("").Funcs(tf).Parse(openRCScript)) + } +} + +func newOpenRCService(i Interface, platform string, c *Config) (Service, error) { + s := &openrc{ + i: i, + platform: platform, + Config: c, + } + return s, nil +} + +var errNoUserServiceOpenRC = errors.New("user services are not supported on OpenRC") + +func (s *openrc) configPath() (cp string, err error) { + if s.Option.bool(optionUserService, optionUserServiceDefault) { + err = errNoUserServiceOpenRC + return + } + cp = "/etc/init.d/" + s.Config.Name + return +} + +func (s *openrc) Install() error { + confPath, err := s.configPath() + if err != nil { + return err + } + _, err = os.Stat(confPath) + if err == nil { + return fmt.Errorf("Init already exists: %s", confPath) + } + + f, err := os.Create(confPath) + if err != nil { + return err + } + defer f.Close() + + err = os.Chmod(confPath, 0755) + if err != nil { + return err + } + + path, err := s.execPath() + if err != nil { + return err + } + + var to = &struct { + *Config + Path string + }{ + s.Config, + path, + } + + err = s.template().Execute(f, to) + if err != nil { + return err + } + // run rc-update + return s.runAction("add") +} + +func (s *openrc) Uninstall() error { + confPath, err := s.configPath() + if err != nil { + return err + } + if err := os.Remove(confPath); err != nil { + return err + } + return s.runAction("delete") +} + +func (s *openrc) Logger(errs chan<- error) (Logger, error) { + if system.Interactive() { + return ConsoleLogger, nil + } + return s.SystemLogger(errs) +} + +func (s *openrc) SystemLogger(errs chan<- error) (Logger, error) { + return newSysLogger(s.Name, errs) +} + +func (s *openrc) Run() (err error) { + err = s.i.Start(s) + if err != nil { + return err + } + + s.Option.funcSingle(optionRunWait, func() { + var sigChan = make(chan os.Signal, 3) + signal.Notify(sigChan, syscall.SIGTERM, os.Interrupt) + <-sigChan + })() + + return s.i.Stop(s) +} + +func (s *openrc) Status() (Status, error) { + // rc-service uses the errno library for its exit codes: + // errno 0 = service started + // errno 1 = EPERM 1 Operation not permitted + // errno 2 = ENOENT 2 No such file or directory + // errno 3 = ESRCH 3 No such process + // for more info, see https://man7.org/linux/man-pages/man3/errno.3.html + _, out, err := runWithOutput("rc-service", s.Name, "status") + if err != nil { + if exiterr, ok := err.(*exec.ExitError); ok { + // The program has exited with an exit code != 0 + exitCode := exiterr.ExitCode() + switch { + case exitCode == 1: + return StatusUnknown, err + case exitCode == 2: + return StatusUnknown, ErrNotInstalled + case exitCode == 3: + return StatusStopped, nil + default: + return StatusUnknown, fmt.Errorf("unknown error: %v - %v", out, err) + } + } else { + return StatusUnknown, err + } + } + return StatusRunning, nil +} + +func (s *openrc) Start() error { + return run("rc-service", s.Name, "start") +} + +func (s *openrc) Stop() error { + return run("rc-service", s.Name, "stop") +} + +func (s *openrc) Restart() error { + err := s.Stop() + if err != nil { + return err + } + time.Sleep(50 * time.Millisecond) + return s.Start() +} + +func (s *openrc) runAction(action string) error { + return s.run(action, s.Name) +} + +func (s *openrc) run(action string, args ...string) error { + return run("rc-update", append([]string{action}, args...)...) +} + +const openRCScript = `#!/sbin/openrc-run +supervisor=supervise-daemon +name="{{.DisplayName}}" +description="{{.Description}}" +command={{.Path|cmdEscape}} +{{- if .Arguments }} +command_args="{{range .Arguments}}{{.}} {{end}}" +{{- end }} +name=$(basename $(readlink -f $command)) +supervise_daemon_args="--stdout /var/log/${name}.log --stderr /var/log/${name}.err" + +{{- if .Dependencies }} +depend() { +{{- range $i, $dep := .Dependencies}} +{{"\t"}}{{$dep}}{{end}} +} +{{- end}} +` diff --git a/vendor/github.com/kardianos/service/service_systemd_linux.go b/vendor/github.com/kardianos/service/service_systemd_linux.go index 36fb26568c..3dfcf8ae97 100644 --- a/vendor/github.com/kardianos/service/service_systemd_linux.go +++ b/vendor/github.com/kardianos/service/service_systemd_linux.go @@ -69,7 +69,7 @@ func (s *systemd) Platform() string { func (s *systemd) configPath() (cp string, err error) { if !s.isUserService() { - cp = "/etc/systemd/system/" + s.Config.Name + ".service" + cp = "/etc/systemd/system/" + s.unitName() return } homeDir, err := os.UserHomeDir() @@ -81,10 +81,14 @@ func (s *systemd) configPath() (cp string, err error) { if err != nil { return } - cp = filepath.Join(systemdUserDir, s.Config.Name+".service") + cp = filepath.Join(systemdUserDir, s.unitName()) return } +func (s *systemd) unitName() string { + return s.Config.Name + ".service" +} + func (s *systemd) getSystemdVersion() int64 { _, out, err := runWithOutput("systemctl", "--version") if err != nil { @@ -230,7 +234,7 @@ func (s *systemd) Run() (err error) { } func (s *systemd) Status() (Status, error) { - exitCode, out, err := runWithOutput("systemctl", "is-active", s.Name) + exitCode, out, err := runWithOutput("systemctl", "is-active", s.unitName()) if exitCode == 0 && err != nil { return StatusUnknown, err } @@ -240,7 +244,7 @@ func (s *systemd) Status() (Status, error) { return StatusRunning, nil case strings.HasPrefix(out, "inactive"): // inactive can also mean its not installed, check unit files - exitCode, out, err := runWithOutput("systemctl", "list-unit-files", "-t", "service", s.Name) + exitCode, out, err := runWithOutput("systemctl", "list-unit-files", "-t", "service", s.unitName()) if exitCode == 0 && err != nil { return StatusUnknown, err } @@ -279,7 +283,7 @@ func (s *systemd) run(action string, args ...string) error { } func (s *systemd) runAction(action string) error { - return s.run(action, s.Name+".service") + return s.run(action, s.unitName()) } const systemdScript = `[Unit] diff --git a/vendor/github.com/kardianos/service/service_sysv_linux.go b/vendor/github.com/kardianos/service/service_sysv_linux.go index f6eebb0514..a0ca297b67 100644 --- a/vendor/github.com/kardianos/service/service_sysv_linux.go +++ b/vendor/github.com/kardianos/service/service_sysv_linux.go @@ -213,7 +213,7 @@ get_pid() { } is_running() { - [ -f "$pid_file" ] && ps $(get_pid) > /dev/null 2>&1 + [ -f "$pid_file" ] && cat /proc/$(get_pid)/stat > /dev/null 2>&1 } case "$1" in diff --git a/vendor/github.com/kardianos/service/service_windows.go b/vendor/github.com/kardianos/service/service_windows.go index c6ee3a6c07..9e930f6d03 100644 --- a/vendor/github.com/kardianos/service/service_windows.go +++ b/vendor/github.com/kardianos/service/service_windows.go @@ -11,15 +11,33 @@ import ( "strconv" "strings" "sync" + "syscall" "time" + "golang.org/x/sys/windows" "golang.org/x/sys/windows/registry" "golang.org/x/sys/windows/svc" "golang.org/x/sys/windows/svc/eventlog" "golang.org/x/sys/windows/svc/mgr" ) -const version = "windows-service" +const ( + version = "windows-service" + + StartType = "StartType" + ServiceStartManual = "manual" + ServiceStartDisabled = "disabled" + ServiceStartAutomatic = "automatic" + + OnFailure = "OnFailure" + OnFailureRestart = "restart" + OnFailureReboot = "reboot" + OnFailureNoAction = "noaction" + OnFailureDelayDuration = "OnFailureDelayDuration" + OnFailureResetPeriod = "OnFailureResetPeriod" + + errnoServiceDoesNotExist syscall.Errno = 1060 +) type windowsService struct { i Interface @@ -220,18 +238,59 @@ func (ws *windowsService) Install() error { s.Close() return fmt.Errorf("service %s already exists", ws.Name) } + var startType int32 + switch ws.Option.string(StartType, ServiceStartAutomatic) { + case ServiceStartAutomatic: + startType = mgr.StartAutomatic + case ServiceStartManual: + startType = mgr.StartManual + case ServiceStartDisabled: + startType = mgr.StartDisabled + } + + serviceType := windows.SERVICE_WIN32_OWN_PROCESS + if ws.Option.bool("Interactive", false) { + serviceType = serviceType | windows.SERVICE_INTERACTIVE_PROCESS + } + s, err = m.CreateService(ws.Name, exepath, mgr.Config{ DisplayName: ws.DisplayName, Description: ws.Description, - StartType: mgr.StartAutomatic, + StartType: uint32(startType), ServiceStartName: ws.UserName, Password: ws.Option.string("Password", ""), Dependencies: ws.Dependencies, DelayedAutoStart: ws.Option.bool("DelayedAutoStart", false), + ServiceType: uint32(serviceType), }, ws.Arguments...) if err != nil { return err } + if onFailure := ws.Option.string(OnFailure, ""); onFailure != "" { + var delay = 1 * time.Second + if d, err := time.ParseDuration(ws.Option.string(OnFailureDelayDuration, "1s")); err == nil { + delay = d + } + var actionType int + switch onFailure { + case OnFailureReboot: + actionType = mgr.ComputerReboot + case OnFailureRestart: + actionType = mgr.ServiceRestart + case OnFailureNoAction: + actionType = mgr.NoAction + default: + actionType = mgr.ServiceRestart + } + if err := s.SetRecoveryActions([]mgr.RecoveryAction{ + { + Type: actionType, + Delay: delay, + }, + }, uint32(ws.Option.int(OnFailureResetPeriod, 10))); err != nil { + return err + } + } defer s.Close() err = eventlog.InstallAsEventCreate(ws.Name, eventlog.Error|eventlog.Warning|eventlog.Info) if err != nil { @@ -305,7 +364,7 @@ func (ws *windowsService) Status() (Status, error) { s, err := m.OpenService(ws.Name) if err != nil { - if err.Error() == "The specified service does not exist as an installed service." { + if errno, ok := err.(syscall.Errno); ok && errno == errnoServiceDoesNotExist { return StatusUnknown, ErrNotInstalled } return StatusUnknown, err diff --git a/vendor/github.com/kardianos/service/version.go b/vendor/github.com/kardianos/service/version.go index 9d40c98a56..a7a2f3a11e 100644 --- a/vendor/github.com/kardianos/service/version.go +++ b/vendor/github.com/kardianos/service/version.go @@ -40,7 +40,7 @@ func versionCompare(v1, v2 []int) (int, error) { return 0, nil } -// parseVersion will parse any integer type version seperated by periods. +// parseVersion will parse any integer type version separated by periods. // This does not fully support semver style versions. func parseVersion(v string) []int { version := make([]int, 3) diff --git a/vendor/github.com/pelletier/go-toml/example-crlf.toml b/vendor/github.com/pelletier/go-toml/example-crlf.toml index 3d902f2820..12950a163d 100644 --- a/vendor/github.com/pelletier/go-toml/example-crlf.toml +++ b/vendor/github.com/pelletier/go-toml/example-crlf.toml @@ -1,29 +1,29 @@ -# This is a TOML document. Boom. - -title = "TOML Example" - -[owner] -name = "Tom Preston-Werner" -organization = "GitHub" -bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." -dob = 1979-05-27T07:32:00Z # First class dates? Why not? - -[database] -server = "192.168.1.1" -ports = [ 8001, 8001, 8002 ] -connection_max = 5000 -enabled = true - -[servers] - - # You can indent as you please. Tabs or spaces. TOML don't care. - [servers.alpha] - ip = "10.0.0.1" - dc = "eqdc10" - - [servers.beta] - ip = "10.0.0.2" - dc = "eqdc10" - -[clients] -data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it +# This is a TOML document. Boom. + +title = "TOML Example" + +[owner] +name = "Tom Preston-Werner" +organization = "GitHub" +bio = "GitHub Cofounder & CEO\nLikes tater tots and beer." +dob = 1979-05-27T07:32:00Z # First class dates? Why not? + +[database] +server = "192.168.1.1" +ports = [ 8001, 8001, 8002 ] +connection_max = 5000 +enabled = true + +[servers] + + # You can indent as you please. Tabs or spaces. TOML don't care. + [servers.alpha] + ip = "10.0.0.1" + dc = "eqdc10" + + [servers.beta] + ip = "10.0.0.2" + dc = "eqdc10" + +[clients] +data = [ ["gamma", "delta"], [1, 2] ] # just an update to make sure parsers support it diff --git a/vendor/github.com/spf13/afero/.travis.yml b/vendor/github.com/spf13/afero/.travis.yml index 8fc1261cb7..0637db726d 100644 --- a/vendor/github.com/spf13/afero/.travis.yml +++ b/vendor/github.com/spf13/afero/.travis.yml @@ -1,21 +1,21 @@ -sudo: false -language: go - -go: - - 1.9 - - "1.10" - - tip - -os: - - linux - - osx - -matrix: - allow_failures: - - go: tip - fast_finish: true - -script: - - go build - - go test -race -v ./... - +sudo: false +language: go + +go: + - 1.9 + - "1.10" + - tip + +os: + - linux + - osx + +matrix: + allow_failures: + - go: tip + fast_finish: true + +script: + - go build + - go test -race -v ./... + diff --git a/vendor/modules.txt b/vendor/modules.txt index 4f935161a6..c4e80bbcc5 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -221,7 +221,7 @@ github.com/julz/importas # github.com/k-sone/critbitgo v1.4.0 ## explicit github.com/k-sone/critbitgo -# github.com/kardianos/service v1.2.0 +# github.com/kardianos/service v1.2.1 ## explicit github.com/kardianos/service # github.com/kisielk/errcheck v1.6.0