diff options
author | David Anderson <[email protected]> | 2017-01-01 13:42:47 -0800 |
---|---|---|
committer | David Anderson <[email protected]> | 2017-01-01 13:42:47 -0800 |
commit | b321571464ebd231043ead1e15f23dba1c02970c (patch) | |
tree | f87aa36cce7462c3ce73f0157fefb15bca0e3ea3 | |
parent | 55ba69dad29c3f6b3aec89789fc8a773cd776b28 (diff) |
Add godoc comments to appease golint.
-rw-r--r-- | config.go | 4 | ||||
-rw-r--r-- | main.go | 1 |
2 files changed, 5 insertions, 0 deletions
@@ -24,6 +24,7 @@ import ( "sync" ) +// A Route maps a match on a domain name to a backend. type Route struct { match *regexp.Regexp backend string @@ -54,6 +55,7 @@ func dnsRegex(s string) (*regexp.Regexp, error) { return regexp.Compile(strings.Join(b, `\.`)) } +// Match returns the backend for hostname. func (c *Config) Match(hostname string) string { c.mu.Lock() defer c.mu.Unlock() @@ -65,6 +67,7 @@ func (c *Config) Match(hostname string) string { return "" } +// Read replaces the current Config with one read from r. func (c *Config) Read(r io.Reader) error { var routes []Route @@ -97,6 +100,7 @@ func (c *Config) Read(r io.Reader) error { return nil } +// ReadFile replaces the current Config with one read from path. func (c *Config) ReadFile(path string) error { f, err := os.Open(path) if err != nil { @@ -53,6 +53,7 @@ func main() { } } +// A Conn handles the TLS proxying of one user connection. type Conn struct { *net.TCPConn |