remove dep on osext

This commit is contained in:
Daniel Theophanes
2019-02-08 09:29:24 -08:00
parent 4c239ee84e
commit 56787a3ea0
4 changed files with 8 additions and 18 deletions
+1 -2
View File
@@ -14,7 +14,6 @@ import (
"os/exec"
"path/filepath"
"github.com/kardianos/osext"
"github.com/kardianos/service"
)
@@ -105,7 +104,7 @@ func (p *program) Stop(s service.Service) error {
}
func getConfigPath() (string, error) {
fullexecpath, err := osext.Executable()
fullexecpath, err := os.Executable()
if err != nil {
return "", err
}
+5
View File
@@ -0,0 +1,5 @@
module github.com/kardianos/service
go 1.10
require golang.org/x/sys v0.0.0-20190204203706-41f3e6584952
+2
View File
@@ -0,0 +1,2 @@
golang.org/x/sys v0.0.0-20190204203706-41f3e6584952 h1:FDfvYgoVsA7TTZSbgiqjAbfPbK47CNHdWl3h/PJtii0=
golang.org/x/sys v0.0.0-20190204203706-41f3e6584952/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-16
View File
@@ -1,16 +0,0 @@
//+build !go1.8
package service
import (
"path/filepath"
"github.com/kardianos/osext"
)
func (c *Config) execPath() (string, error) {
if len(c.Executable) != 0 {
return filepath.Abs(c.Executable)
}
return osext.Executable()
}