fortify/internal/state/register.go

26 lines
435 B
Go
Raw Normal View History

package state
var (
cleanupCandidate []string
enablements *Enablements
xcbActionComplete bool
)
func RegisterRevertPath(p string) {
cleanupCandidate = append(cleanupCandidate, p)
}
func RegisterEnablement(e Enablements) {
if enablements != nil {
panic("enablement state set twice")
}
enablements = &e
}
func XcbActionComplete() {
if xcbActionComplete {
Fatal("xcb inserted twice")
}
xcbActionComplete = true
}