fix some typos

Signed-off-by: bin liu <liubin0329@gmail.com>
This commit is contained in:
bin liu 2015-04-20 04:04:08 +00:00
parent 91eef607d0
commit a004b52ab3
4 changed files with 5 additions and 5 deletions

View File

@ -19,7 +19,7 @@ var (
// ErrIfaceName error is returned when a new name could not be generated.
ErrIfaceName = errors.New("Failed to find name for new interface")
// ErrNoIPAddr error is returned when bridge has no IPv4 addrss configured.
// ErrNoIPAddr error is returned when bridge has no IPv4 address configured.
ErrNoIPAddr = errors.New("Bridge has no IPv4 address configured")
)

View File

@ -70,7 +70,7 @@ func electBridgeIPv4(config *Configuration) (*net.IPNet, error) {
nameservers = append(nameservers, getNameserversAsCIDR(resolvConf)...)
}
// Try to automatically elect appropriate brige IPv4 settings.
// Try to automatically elect appropriate bridge IPv4 settings.
for _, n := range bridgeNetworks {
if err := netutils.CheckNameserverOverlaps(nameservers, n); err == nil {
if err := netutils.CheckRouteOverlaps(n); err == nil {

View File

@ -122,7 +122,7 @@ func getDynamicPortRange() (start int, end int, err error) {
}
// RequestPort requests new port from global ports pool for specified ip and proto.
// If port is 0 it returns first free port. Otherwise it cheks port availability
// If port is 0 it returns first free port. Otherwise it checks port availability
// in pool and return that port or error if port is already busy.
func (p *PortAllocator) RequestPort(ip net.IP, proto string, port int) (int, error) {
p.mutex.Lock()

View File

@ -25,7 +25,7 @@ var (
ErrUnknownBackendAddressType = errors.New("unknown container address type not supported")
// ErrPortMappedForIP refers to a port already mapped to an ip address
ErrPortMappedForIP = errors.New("port is already mapped to ip")
// ErrPortNotMapped refers to an unampped port
// ErrPortNotMapped refers to an unmapped port
ErrPortNotMapped = errors.New("port is not mapped")
)
@ -45,7 +45,7 @@ func New() *PortMapper {
return NewWithPortAllocator(portallocator.New())
}
// NewWithPortAllocator returns a new instance of PortMapper wich will use the specified PortAllocator
// NewWithPortAllocator returns a new instance of PortMapper which will use the specified PortAllocator
func NewWithPortAllocator(allocator *portallocator.PortAllocator) *PortMapper {
return &PortMapper{
currentMappings: make(map[string]*mapping),