mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-23 22:27:38 -05:00
A few comments, slight tweaks
This commit is contained in:
parent
d18cf12f14
commit
c3e6463676
3 changed files with 5 additions and 4 deletions
|
@ -39,7 +39,7 @@ var (
|
|||
// The name and version of the application.
|
||||
AppName, AppVersion string
|
||||
|
||||
// If true, initialization will not show any output.
|
||||
// If true, initialization will not show any informative output.
|
||||
Quiet bool
|
||||
|
||||
// DefaultInput is the default configuration to use when config input is empty or missing.
|
||||
|
|
|
@ -278,6 +278,7 @@ func arrangeBindings(allConfigs []server.Config) (Group, error) {
|
|||
func resolveAddr(conf server.Config) (resolvAddr *net.TCPAddr, warnErr error, fatalErr error) {
|
||||
bindHost := conf.BindHost
|
||||
|
||||
// TODO: Do we even need the port? Maybe we just need to look up the host.
|
||||
resolvAddr, warnErr = net.ResolveTCPAddr("tcp", net.JoinHostPort(bindHost, conf.Port))
|
||||
if warnErr != nil {
|
||||
// Most likely the host lookup failed or the port is unknown
|
||||
|
|
|
@ -16,9 +16,9 @@ func init() {
|
|||
letsencrypt.OnChange = func() error { return Restart(nil) }
|
||||
}
|
||||
|
||||
// isLocalhost returns true if the string looks explicitly like a localhost address.
|
||||
func isLocalhost(s string) bool {
|
||||
return s == "localhost" || s == "::1" || strings.HasPrefix(s, "127.")
|
||||
// isLocalhost returns true if host looks explicitly like a localhost address.
|
||||
func isLocalhost(host string) bool {
|
||||
return host == "localhost" || host == "::1" || strings.HasPrefix(host, "127.")
|
||||
}
|
||||
|
||||
// checkFdlimit issues a warning if the OS max file descriptors is below a recommended minimum.
|
||||
|
|
Loading…
Reference in a new issue