chore(repo): renamed gonf subfolder to something more traditional in go land
This commit is contained in:
parent
3b9af43738
commit
560becfd32
14 changed files with 2 additions and 2 deletions
50
pkg/promises.go
Normal file
50
pkg/promises.go
Normal file
|
@ -0,0 +1,50 @@
|
|||
package gonf
|
||||
|
||||
type Promise interface {
|
||||
IfRepaired(...Promise) Promise
|
||||
Promise() Promise
|
||||
Resolve()
|
||||
}
|
||||
|
||||
//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 (
|
||||
PROMISED = iota
|
||||
BROKEN
|
||||
KEPT
|
||||
REPAIRED
|
||||
)
|
||||
|
||||
func (s Status) String() string {
|
||||
switch s {
|
||||
case PROMISED:
|
||||
return "promised"
|
||||
case BROKEN:
|
||||
return "broken"
|
||||
case KEPT:
|
||||
return "kept"
|
||||
case REPAIRED:
|
||||
return "repaired"
|
||||
}
|
||||
panic("unknown")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue