mirror of
https://github.com/caddyserver/caddy.git
synced 2025-11-19 21:13:26 -05:00
Merged config and app packages into one called caddy. Abstracted away caddy startup functionality making it easier to embed Caddy in any Go application and use it as a library. Graceful restart (should) now ensure child starts properly. Now piping a gob bundle to child process so that the child can match up inherited listeners to server address. Much cleanup still to do.
13 lines
217 B
Go
13 lines
217 B
Go
package setup
|
|
|
|
import "github.com/mholt/caddy/middleware"
|
|
|
|
func BindHost(c *Controller) (middleware.Middleware, error) {
|
|
for c.Next() {
|
|
if !c.Args(&c.BindHost) {
|
|
return nil, c.ArgErr()
|
|
}
|
|
}
|
|
return nil, nil
|
|
}
|