summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--pkg/commands.go2
-rw-r--r--pkg/custom.go2
-rw-r--r--pkg/files.go2
-rw-r--r--pkg/packages.go2
-rw-r--r--pkg/promises.go21
-rw-r--r--pkg/services.go2
-rw-r--r--pkg/users.go2
7 files changed, 6 insertions, 27 deletions
diff --git a/pkg/commands.go b/pkg/commands.go
index 096da11..4222de7 100644
--- a/pkg/commands.go
+++ b/pkg/commands.go
@@ -43,7 +43,7 @@ func (c *CommandPromise) IfRepaired(p ...Promise) Promise {
return c
}
-func (c *CommandPromise) Promise() Promise {
+func (c *CommandPromise) Promise() *CommandPromise {
commands = append(commands, c)
return c
}
diff --git a/pkg/custom.go b/pkg/custom.go
index 9b4ca3d..bc1a531 100644
--- a/pkg/custom.go
+++ b/pkg/custom.go
@@ -21,7 +21,7 @@ func (c *CustomPromise) IfRepaired(p ...Promise) Promise {
return c
}
-func (c *CustomPromise) Promise() Promise {
+func (c *CustomPromise) Promise() *CustomPromise {
customPromises = append(customPromises, c)
return c
}
diff --git a/pkg/files.go b/pkg/files.go
index 23c27d9..6f22176 100644
--- a/pkg/files.go
+++ b/pkg/files.go
@@ -87,7 +87,7 @@ func (f *FilePromise) IfRepaired(p ...Promise) Promise {
return f
}
-func (f *FilePromise) Promise() Promise {
+func (f *FilePromise) Promise() *FilePromise {
files = append(files, f)
return f
}
diff --git a/pkg/packages.go b/pkg/packages.go
index 87db647..7ed8584 100644
--- a/pkg/packages.go
+++ b/pkg/packages.go
@@ -35,7 +35,7 @@ func (p *PackagePromise) IfRepaired(ps ...Promise) Promise {
return p
}
-func (p *PackagePromise) Promise() Promise {
+func (p *PackagePromise) Promise() *PackagePromise {
packages = append(packages, p)
return p
}
diff --git a/pkg/promises.go b/pkg/promises.go
index 8495650..0198296 100644
--- a/pkg/promises.go
+++ b/pkg/promises.go
@@ -2,31 +2,10 @@ package gonf
type Promise interface {
IfRepaired(...Promise) Promise
- Promise() Promise
Resolve()
Status() Status
}
-//type Operation int
-//
-//const (
-// AND = iota
-// OR
-// NOT
-//)
-//
-//func (o Operation) String() string {
-// switch o {
-// case AND:
-// return "and"
-// case OR:
-// return "or"
-// case NOT:
-// return "not"
-// }
-// panic("unknown")
-//}
-
type Status int
const (
diff --git a/pkg/services.go b/pkg/services.go
index 319599e..6368573 100644
--- a/pkg/services.go
+++ b/pkg/services.go
@@ -42,7 +42,7 @@ func (s *ServicePromise) IfRepaired(p ...Promise) Promise {
return s
}
-func (s *ServicePromise) Promise() Promise {
+func (s *ServicePromise) Promise() *ServicePromise {
services = append(services, s)
return s
}
diff --git a/pkg/users.go b/pkg/users.go
index 2577207..14a8acd 100644
--- a/pkg/users.go
+++ b/pkg/users.go
@@ -46,7 +46,7 @@ func (u *UserPromise) IfRepaired(p ...Promise) Promise {
return u
}
-func (u *UserPromise) Promise() Promise {
+func (u *UserPromise) Promise() *UserPromise {
users = append(users, u)
return u
}