summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkg/custom.go2
-rw-r--r--pkg/packages.go2
-rw-r--r--pkg/permissions.go2
-rw-r--r--pkg/triggers.go11
-rw-r--r--pkg/values.go4
-rw-r--r--stdlib/os/systemd/systemd.go1
6 files changed, 4 insertions, 18 deletions
diff --git a/pkg/custom.go b/pkg/custom.go
index acca226..9b4ca3d 100644
--- a/pkg/custom.go
+++ b/pkg/custom.go
@@ -31,7 +31,7 @@ func (c *CustomPromise) Resolve() {
}
func (c CustomPromise) Status() Status {
- return c.Status()
+ return c.promise.Status()
}
func resolveCustomPromises() (status Status) {
diff --git a/pkg/packages.go b/pkg/packages.go
index fdce87c..bf9322c 100644
--- a/pkg/packages.go
+++ b/pkg/packages.go
@@ -7,7 +7,6 @@ var packages []*PackagePromise
// packages management functions
var packages_install_function func([]string) (Status, []string)
-var packages_update_function *CommandPromise
// ----- Init ------------------------------------------------------------------
func init() {
@@ -17,7 +16,6 @@ func init() {
// ----- Public ----------------------------------------------------------------
func SetPackagesConfiguration(install func([]string) (Status, []string), update *CommandPromise) {
packages_install_function = install
- packages_update_function = update
}
func Package(names ...string) *PackagePromise {
diff --git a/pkg/permissions.go b/pkg/permissions.go
index 3710e68..91287c0 100644
--- a/pkg/permissions.go
+++ b/pkg/permissions.go
@@ -75,7 +75,7 @@ func (p *Permissions) resolve(filename string) (Status, error) {
status = REPAIRED
}
} else {
- return BROKEN, errors.New("Unsupported operating system")
+ return BROKEN, errors.New("unsupported operating system")
}
}
return status, nil
diff --git a/pkg/triggers.go b/pkg/triggers.go
deleted file mode 100644
index 370ab1c..0000000
--- a/pkg/triggers.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package gonf
-
-type simpleTrigger struct {
- fact string
- status Status
-}
-
-//type compositeTrigger struct {
-// triggers []simpleTrigger
-// operation Operation
-//}
diff --git a/pkg/values.go b/pkg/values.go
index bb82787..25f31e4 100644
--- a/pkg/values.go
+++ b/pkg/values.go
@@ -68,13 +68,13 @@ type IntValue struct {
}
func (i IntValue) Bytes() []byte {
- return []byte(string(i.value))
+ return []byte(fmt.Sprint(i.value))
}
func (i IntValue) Int() (int, error) {
return i.value, nil
}
func (i IntValue) String() string {
- return string(i.value)
+ return fmt.Sprint(i.value)
}
// ----- StringsListValue ------------------------------------------------------
diff --git a/stdlib/os/systemd/systemd.go b/stdlib/os/systemd/systemd.go
index 5af1e91..8d5ec77 100644
--- a/stdlib/os/systemd/systemd.go
+++ b/stdlib/os/systemd/systemd.go
@@ -66,5 +66,4 @@ func systemd_service(name, state string) (gonf.Status, error) {
default:
return gonf.BROKEN, errors.New("unsupported systemctl operation " + state)
}
- return gonf.KEPT, nil
}