You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
387 B
27 lines
387 B
package opts
|
|
|
|
import "github.com/rudecs/decort-sdk/typed"
|
|
|
|
type Opts struct {
|
|
IsAdmin bool
|
|
AdminValue string
|
|
}
|
|
|
|
func New(options []DecortOpts) *Opts {
|
|
if len(options) == 0 {
|
|
return nil
|
|
}
|
|
|
|
option := &Opts{}
|
|
|
|
for _, v := range options {
|
|
if v.Type == typed.TypeAdmin {
|
|
option.IsAdmin = true
|
|
option.AdminValue = v.Value
|
|
}
|
|
|
|
}
|
|
|
|
return option
|
|
}
|