From ac83c7ef4426165e6ed636cdaf524d49cec7198d Mon Sep 17 00:00:00 2001 From: Erkan Durmus Date: Thu, 24 Nov 2016 12:27:53 +0200 Subject: [PATCH 1/5] Allow getting executable path --- daemon.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon.go b/daemon.go index 5bcdba8..fd70bb0 100644 --- a/daemon.go +++ b/daemon.go @@ -174,6 +174,9 @@ type Daemon interface { // Status - check the service status Status() (string, error) + + // Executable Path + ExecPath()(string, error) } // New - Create a new daemon From edc0a360a84f5da7403701f6700b2517460c7183 Mon Sep 17 00:00:00 2001 From: Erkan Durmus Date: Thu, 24 Nov 2016 12:30:04 +0200 Subject: [PATCH 2/5] Update daemon.go --- daemon.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/daemon.go b/daemon.go index fd70bb0..7d9f9c3 100644 --- a/daemon.go +++ b/daemon.go @@ -174,9 +174,6 @@ type Daemon interface { // Status - check the service status Status() (string, error) - - // Executable Path - ExecPath()(string, error) } // New - Create a new daemon @@ -187,3 +184,8 @@ type Daemon interface { func New(name, description string, dependencies ...string) (Daemon, error) { return newDaemon(strings.Join(strings.Fields(name), "_"), description, dependencies) } + +// Get executable path +func ExePath() (string, error) { + return execPath() +} From 00fac488cc2deabb44e33ad19bcbc5785349787a Mon Sep 17 00:00:00 2001 From: Erkan Durmus Date: Thu, 24 Nov 2016 12:30:26 +0200 Subject: [PATCH 3/5] Update daemon.go --- daemon.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon.go b/daemon.go index 7d9f9c3..1dc8ea6 100644 --- a/daemon.go +++ b/daemon.go @@ -186,6 +186,6 @@ func New(name, description string, dependencies ...string) (Daemon, error) { } // Get executable path -func ExePath() (string, error) { +func ExecPath() (string, error) { return execPath() } From e4531d5cd0730da2f745c31e2511747a52596da0 Mon Sep 17 00:00:00 2001 From: Igor Dolzhikov Date: Sun, 27 Nov 2016 03:53:38 +0700 Subject: [PATCH 4/5] Fixed linter warning about exportable method comments --- daemon.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/daemon.go b/daemon.go index 1dc8ea6..ab80e6d 100644 --- a/daemon.go +++ b/daemon.go @@ -185,7 +185,7 @@ func New(name, description string, dependencies ...string) (Daemon, error) { return newDaemon(strings.Join(strings.Fields(name), "_"), description, dependencies) } -// Get executable path +// ExecPath tries to get executable path func ExecPath() (string, error) { return execPath() -} +} From f1d327ba8cd55732cb7f477bd20f628a1da24ae2 Mon Sep 17 00:00:00 2001 From: Igor Dolzhikov Date: Sun, 27 Nov 2016 03:54:16 +0700 Subject: [PATCH 5/5] Bumped version number to 0.8.0 --- daemon.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon.go b/daemon.go index ab80e6d..51e8994 100644 --- a/daemon.go +++ b/daemon.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. /* -Package daemon 0.7.0 for use with Go (golang) services. +Package daemon 0.8.0 for use with Go (golang) services. Package daemon provides primitives for daemonization of golang services. This package is not provide implementation of user daemon,