pre_go1.8.go 237 B

12345678910111213141516
  1. //+build !go1.8
  2. package service
  3. import (
  4. "path/filepath"
  5. "github.com/kardianos/osext"
  6. )
  7. func (c *Config) execPath() (string, error) {
  8. if len(c.Executable) != 0 {
  9. return filepath.Abs(c.Executable)
  10. }
  11. return osext.Executable()
  12. }