mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-12-23 19:15:40 +00:00
17 lines
266 B
Go
17 lines
266 B
Go
|
package admin
|
||
|
|
||
|
func (c *AdminSocket) _applyOption(opt SetupOption) {
|
||
|
switch v := opt.(type) {
|
||
|
case ListenAddress:
|
||
|
c.config.listenaddr = v
|
||
|
}
|
||
|
}
|
||
|
|
||
|
type SetupOption interface {
|
||
|
isSetupOption()
|
||
|
}
|
||
|
|
||
|
type ListenAddress string
|
||
|
|
||
|
func (a ListenAddress) isSetupOption() {}
|