Skip to content

Commit

Permalink
Merge branch 'release/0.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Igor Dolzhikov committed Sep 1, 2015
2 parents 170c1ee + af70594 commit 9bef40d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
)

func main() {
service, err := daemon.New("name", "description", []string{})
service, err := daemon.New("name", "description")
if err != nil {
log.Fatal("Error: ", err)
}
Expand Down Expand Up @@ -57,7 +57,7 @@ const (
port = ":9977"
)

// dependencies that are required by the service
// dependencies that are NOT required by the service, but might be used
var dependencies = []string{"dummy.service"}

var stdlog, errlog *log.Logger
Expand Down Expand Up @@ -158,7 +158,7 @@ func init() {
}

func main() {
srv, err := daemon.New(name, description, dependencies)
srv, err := daemon.New(name, description, dependencies...)
if err != nil {
errlog.Println("Error: ", err)
os.Exit(1)
Expand Down
8 changes: 4 additions & 4 deletions daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// license that can be found in the LICENSE file.

/*
Package daemon 0.2.12 for use with Go (golang) services.
Package daemon 0.3.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,
Expand Down Expand Up @@ -36,7 +36,7 @@ Example:
port = ":9977"
)
// dependencies that are required by the service
// dependencies that are NOT required by the service, but might be used
var dependencies = []string{"dummy.service"}
var stdlog, errlog *log.Logger
Expand Down Expand Up @@ -137,7 +137,7 @@ Example:
}
func main() {
srv, err := daemon.New(name, description, dependencies)
srv, err := daemon.New(name, description, dependencies...)
if err != nil {
errlog.Println("Error: ", err)
os.Exit(1)
Expand Down Expand Up @@ -180,6 +180,6 @@ type Daemon interface {
//
// name: name of the service
// description: any explanation, what is the service, its purpose
func New(name, description string, dependencies []string) (Daemon, error) {
func New(name, description string, dependencies ...string) (Daemon, error) {
return newDaemon(strings.Join(strings.Fields(name), "_"), description, dependencies)
}
4 changes: 2 additions & 2 deletions example/myservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const (
port = ":9977"
)

// dependencies that are required by the service
// dependencies that are NOT required by the service, but might be used
var dependencies = []string{"dummy.service"}

var stdlog, errlog *log.Logger
Expand Down Expand Up @@ -123,7 +123,7 @@ func init() {
}

func main() {
srv, err := daemon.New(name, description, dependencies)
srv, err := daemon.New(name, description, dependencies...)
if err != nil {
errlog.Println("Error: ", err)
os.Exit(1)
Expand Down

0 comments on commit 9bef40d

Please sign in to comment.