diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-10-16 14:38:57 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-10-16 14:38:57 +0900 |
| commit | c21168a74181903535c63f49c5a6d3bd2052c883 (patch) | |
| tree | 6ed272c6a4d3712624077cf39794d7d1eb22295f /internal/system/op.go | |
| parent | 084cd84f36a1d608541b4aa4e1e95334395d8953 (diff) | |
system: move enablements from state package
This removes the unnecessary import of the state package.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
Diffstat (limited to 'internal/system/op.go')
| -rw-r--r-- | internal/system/op.go | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/internal/system/op.go b/internal/system/op.go index c3f93cdb..a9040187 100644 --- a/internal/system/op.go +++ b/internal/system/op.go @@ -4,19 +4,17 @@ import ( "errors" "fmt" "sync" - - "git.ophivana.moe/cat/fortify/internal/state" ) const ( - // Process type is unconditionally reverted on exit. - Process = state.EnableLength + 1 // User type is reverted at final launcher exit. - User = state.EnableLength + User = Enablement(ELen) + // Process type is unconditionally reverted on exit. + Process = Enablement(ELen + 1) ) type Criteria struct { - *state.Enablements + *Enablements } func (ec *Criteria) hasType(o Op) bool { @@ -31,7 +29,7 @@ func (ec *Criteria) hasType(o Op) bool { // Op is a reversible system operation. type Op interface { // Type returns Op's enablement type. - Type() state.Enablement + Type() Enablement // apply the Op apply(sys *I) error @@ -43,7 +41,7 @@ type Op interface { String() string } -func TypeString(e state.Enablement) string { +func TypeString(e Enablement) string { switch e { case User: return "User" |
