service: update comments.

This commit is contained in:
Daniel Theophanes
2015-01-13 21:54:35 -08:00
parent bc48b26bdb
commit 2b410d62be
8 changed files with 39 additions and 8 deletions
+4
View File
@@ -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
View File
@@ -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 (
+5 -7
View File
@@ -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)
}
+10
View File
@@ -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 (
+4
View File
@@ -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 (
+4
View File
@@ -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 (
+3 -1
View File
@@ -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
+4
View File
@@ -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 (