mirror of
https://github.com/caddyserver/caddy.git
synced 2025-05-25 20:29:59 +08:00
logging: Implement net writer (#2884)
* Implement UDP writer * Implement Net Writer * Utilize Caddy's address parsing functions * A couple little fixes (see #2884)
This commit is contained in:

committed by
Matt Holt

parent
6ea121ddf8
commit
c3bcd967bd
6
admin.go
6
admin.go
@ -711,6 +711,12 @@ traverseLoop:
|
||||
return fmt.Errorf("unrecognized method %s", method)
|
||||
}
|
||||
} else {
|
||||
// if we are "PUTting" a new resource, the key(s) in its path
|
||||
// might not exist yet; that's OK but we need to make them as
|
||||
// we go, while we still have a pointer from the level above
|
||||
if v[part] == nil && method == http.MethodPut {
|
||||
v[part] = make(map[string]interface{})
|
||||
}
|
||||
ptr = v[part]
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user