mirror of
https://github.com/caddyserver/caddy.git
synced 2025-10-19 15:53:17 +00: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:
parent
6ea121ddf8
commit
c3bcd967bd
4 changed files with 93 additions and 4 deletions
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]
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue