service: update comments.
This commit is contained in:
@@ -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
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -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
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
+5
-7
@@ -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
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
@@ -5,11 +9,5 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestPlatformName(t *testing.T) {
|
func TestPlatformName(t *testing.T) {
|
||||||
s, err := NewServiceConfig(&Config{
|
t.Logf("Platform is %v", Local)
|
||||||
Name: "Test",
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
t.Errorf("Failed to create service: %v", err)
|
|
||||||
}
|
|
||||||
t.Logf("Platform is %s", s.String())
|
|
||||||
}
|
}
|
||||||
|
|||||||
+10
@@ -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.
|
// Package service provides a simple way to create a system service.
|
||||||
// Currently supports Windows, Linux/(systemd | Upstart | SysV), and OSX/Launchd.
|
// 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
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -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
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
@@ -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
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
+3
-1
@@ -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
|
// +build linux darwin
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
package service
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
|||||||
Reference in New Issue
Block a user