Encrypt restore token
This commit is contained in:
parent
abd9fd4773
commit
16dc47b570
11 changed files with 137 additions and 49 deletions
|
|
@ -55,14 +55,14 @@ const (
|
|||
|
||||
type ControllerInfo struct {
|
||||
Name string
|
||||
Init func(bool) (Controller, error)
|
||||
Init func() (Controller, error)
|
||||
|
||||
priority int
|
||||
}
|
||||
|
||||
var Controllers []ControllerInfo
|
||||
|
||||
func RegisterController(name string, init func(bool) (Controller, error), priority int) {
|
||||
func RegisterController(name string, init func() (Controller, error), priority int) {
|
||||
Controllers = append(Controllers, ControllerInfo{name, init, priority})
|
||||
sort.SliceStable(Controllers, func(i, j int) bool {
|
||||
return Controllers[i].priority < Controllers[j].priority
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue