diff --git a/console.go b/console.go index cc46dbb..f799f37 100644 --- a/console.go +++ b/console.go @@ -1,3 +1,7 @@ +// Copyright 2015 Daniel Theophanes. +// Use of this source code is governed by a zlib-style +// license that can be found in the LICENSE file.package service + package service import ( diff --git a/example/main.go b/example/main.go index 637f997..bcd5bd5 100644 --- a/example/main.go +++ b/example/main.go @@ -1,3 +1,8 @@ +// Copyright 2015 Daniel Theophanes. +// Use of this source code is governed by a zlib-style +// license that can be found in the LICENSE file.package service + +// Simple service that only works by printing a log message every few seconds. package main import ( diff --git a/name_test.go b/name_test.go index e661f15..29fd4ce 100644 --- a/name_test.go +++ b/name_test.go @@ -1,3 +1,7 @@ +// Copyright 2015 Daniel Theophanes. +// Use of this source code is governed by a zlib-style +// license that can be found in the LICENSE file.package service + package service import ( @@ -5,11 +9,5 @@ import ( ) func TestPlatformName(t *testing.T) { - s, err := NewServiceConfig(&Config{ - Name: "Test", - }) - if err != nil { - t.Errorf("Failed to create service: %v", err) - } - t.Logf("Platform is %s", s.String()) + t.Logf("Platform is %v", Local) } diff --git a/service.go b/service.go index 1d3c4a7..64f1b40 100644 --- a/service.go +++ b/service.go @@ -1,5 +1,15 @@ +// Copyright 2015 Daniel Theophanes. +// Use of this source code is governed by a zlib-style +// license that can be found in the LICENSE file.package service + // Package service provides a simple way to create a system service. // Currently supports Windows, Linux/(systemd | Upstart | SysV), 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 +// despite the substantial differences. +// It also can be used to detect how a program is called, from an interactive +// terminal or from a service manager. package service import ( diff --git a/service_darwin.go b/service_darwin.go index 4c805ff..2f08d35 100644 --- a/service_darwin.go +++ b/service_darwin.go @@ -1,3 +1,7 @@ +// Copyright 2015 Daniel Theophanes. +// Use of this source code is governed by a zlib-style +// license that can be found in the LICENSE file.package service + package service import ( diff --git a/service_linux.go b/service_linux.go index a731bf8..1da803d 100644 --- a/service_linux.go +++ b/service_linux.go @@ -1,3 +1,7 @@ +// Copyright 2015 Daniel Theophanes. +// Use of this source code is governed by a zlib-style +// license that can be found in the LICENSE file.package service + package service import ( diff --git a/service_unix.go b/service_unix.go index d6c56b8..1af0cc8 100644 --- a/service_unix.go +++ b/service_unix.go @@ -1,4 +1,6 @@ -// +// Copyright 2015 Daniel Theophanes. +// Use of this source code is governed by a zlib-style +// license that can be found in the LICENSE file.package service // +build linux darwin diff --git a/service_windows.go b/service_windows.go index 9698ae7..6c9fa74 100644 --- a/service_windows.go +++ b/service_windows.go @@ -1,3 +1,7 @@ +// Copyright 2015 Daniel Theophanes. +// Use of this source code is governed by a zlib-style +// license that can be found in the LICENSE file.package service + package service import (