diff --git a/tcp/mux.go b/tcp/mux.go index e183a31ea6..e7b901a8e0 100644 --- a/tcp/mux.go +++ b/tcp/mux.go @@ -1,3 +1,4 @@ +// Package tcp provides a simple multiplexer over TCP. package tcp // import "github.com/influxdata/influxdb/tcp" import ( @@ -53,7 +54,7 @@ func (rc *replayConn) Read(b []byte) (int, error) { return 1, nil } -// NewMux returns a new instance of Mux for ln. +// NewMux returns a new instance of Mux. func NewMux() *Mux { return &Mux{ m: make(map[byte]*listener), @@ -62,7 +63,7 @@ func NewMux() *Mux { } } -// Serve handles connections from ln and multiplexes then across registered listener. +// Serve handles connections from ln and multiplexes then across registered listeners. func (mux *Mux) Serve(ln net.Listener) error { mux.mu.Lock() mux.ln = ln @@ -174,7 +175,7 @@ func (mux *Mux) Listen(header byte) net.Listener { // first byte of the connection as a short first Read(). // // This can be used to pass to an HTTP server, so long as there are no conflicts -// with registsered listener bytes and the first character of the HTTP request: +// with registered listener bytes and the first character of the HTTP request: // 71 ('G') for GET, etc. func (mux *Mux) DefaultListener() net.Listener { if mux.defaultListener == nil { diff --git a/toml/toml.go b/toml/toml.go index 0b9b543676..5a84fa1696 100644 --- a/toml/toml.go +++ b/toml/toml.go @@ -1,3 +1,4 @@ +// Package toml adds support to marshal and unmarshal types not in the official TOML spec. package toml // import "github.com/influxdata/influxdb/toml" import ( @@ -12,6 +13,7 @@ const maxInt = int64(^uint(0) >> 1) // Duration is a TOML wrapper type for time.Duration. type Duration time.Duration +// String returns the string representation of the duration. func (d Duration) String() string { return time.Duration(d).String() } diff --git a/uuid/uuid.go b/uuid/uuid.go index be1a81cce7..439e0dc4a3 100644 --- a/uuid/uuid.go +++ b/uuid/uuid.go @@ -31,6 +31,7 @@ // // http://tools.ietf.org/html/rfc4122 +// Package uuid provides functions to create time-based UUIDs. package uuid // import "github.com/influxdata/influxdb/uuid" import (