mirror of https://github.com/slackhq/nebula.git
more cleanup
This commit is contained in:
parent
8ba8376844
commit
dcd83c33f0
|
@ -92,8 +92,8 @@ func (c *C) HasChanged(k string) bool {
|
|||
}
|
||||
|
||||
var (
|
||||
nv interface{}
|
||||
ov interface{}
|
||||
nv any
|
||||
ov any
|
||||
)
|
||||
|
||||
if k == "" {
|
||||
|
@ -292,7 +292,7 @@ func (c *C) GetDuration(k string, d time.Duration) time.Duration {
|
|||
return v
|
||||
}
|
||||
|
||||
func (c *C) Get(k string) interface{} {
|
||||
func (c *C) Get(k string) any {
|
||||
return c.get(k, c.Settings)
|
||||
}
|
||||
|
||||
|
@ -300,7 +300,7 @@ func (c *C) IsSet(k string) bool {
|
|||
return c.get(k, c.Settings) != nil
|
||||
}
|
||||
|
||||
func (c *C) get(k string, v interface{}) interface{} {
|
||||
func (c *C) get(k string, v any) any {
|
||||
parts := strings.Split(k, ".")
|
||||
for _, p := range parts {
|
||||
m, ok := v.(map[string]any)
|
||||
|
|
Loading…
Reference in New Issue