1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

fix typos

Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
allencloud 2016-03-11 23:02:17 +08:00
parent 9ad946eded
commit bbeb859b64
6 changed files with 14 additions and 15 deletions

View file

@ -75,8 +75,8 @@ func discoveryOpts(clusterOpts map[string]string) (time.Duration, time.Duration,
return heartbeat, ttl, nil return heartbeat, ttl, nil
} }
// initDiscovery initialized the nodes discovery subsystem by connecting to the specified backend // initDiscovery initializes the nodes discovery subsystem by connecting to the specified backend
// and start a registration loop to advertise the current node under the specified address. // and starts a registration loop to advertise the current node under the specified address.
func initDiscovery(backendAddress, advertiseAddress string, clusterOpts map[string]string) (discoveryReloader, error) { func initDiscovery(backendAddress, advertiseAddress string, clusterOpts map[string]string) (discoveryReloader, error) {
heartbeat, backend, err := parseDiscoveryOptions(backendAddress, clusterOpts) heartbeat, backend, err := parseDiscoveryOptions(backendAddress, clusterOpts)
if err != nil { if err != nil {

View file

@ -6,7 +6,7 @@ import "github.com/docker/docker/layer"
// RootFS describes images root filesystem // RootFS describes images root filesystem
// This is currently a placeholder that only supports layers. In the future // This is currently a placeholder that only supports layers. In the future
// this can be made into a interface that supports different implementations. // this can be made into an interface that supports different implementations.
type RootFS struct { type RootFS struct {
Type string `json:"type"` Type string `json:"type"`
DiffIDs []layer.DiffID `json:"diff_ids,omitempty"` DiffIDs []layer.DiffID `json:"diff_ids,omitempty"`

View file

@ -12,7 +12,7 @@ import (
// RootFS describes images root filesystem // RootFS describes images root filesystem
// This is currently a placeholder that only supports layers. In the future // This is currently a placeholder that only supports layers. In the future
// this can be made into a interface that supports different implementations. // this can be made into an interface that supports different implementations.
type RootFS struct { type RootFS struct {
Type string `json:"type"` Type string `json:"type"`
DiffIDs []layer.DiffID `json:"diff_ids,omitempty"` DiffIDs []layer.DiffID `json:"diff_ids,omitempty"`

View file

@ -1,11 +1,11 @@
// Package layer is package for managing read only // Package layer is package for managing read-only
// and read-write mounts on the union file system // and read-write mounts on the union file system
// driver. Read-only mounts are referenced using a // driver. Read-only mounts are referenced using a
// content hash and are protected from mutation in // content hash and are protected from mutation in
// the exposed interface. The tar format is used // the exposed interface. The tar format is used
// to create read only layers and export both // to create read-only layers and export both
// read only and writable layers. The exported // read-only and writable layers. The exported
// tar data for a read only layer should match // tar data for a read-only layer should match
// the tar used to create the layer. // the tar used to create the layer.
package layer package layer
@ -75,7 +75,7 @@ type TarStreamer interface {
TarStream() (io.ReadCloser, error) TarStream() (io.ReadCloser, error)
} }
// Layer represents a read only layer // Layer represents a read-only layer
type Layer interface { type Layer interface {
TarStreamer TarStreamer
@ -138,7 +138,7 @@ type RWLayer interface {
} }
// Metadata holds information about a // Metadata holds information about a
// read only layer // read-only layer
type Metadata struct { type Metadata struct {
// ChainID is the content hash of the layer // ChainID is the content hash of the layer
ChainID ChainID ChainID ChainID
@ -247,7 +247,7 @@ func ReleaseAndLog(ls Store, l Layer) {
LogReleaseMetadata(metadata) LogReleaseMetadata(metadata)
} }
// LogReleaseMetadata logs a metadata array, use this to // LogReleaseMetadata logs a metadata array, uses this to
// ensure consistent logging for release metadata // ensure consistent logging for release metadata
func LogReleaseMetadata(metadatas []Metadata) { func LogReleaseMetadata(metadatas []Metadata) {
for _, metadata := range metadatas { for _, metadata := range metadatas {

View file

@ -22,8 +22,7 @@ func ReadMemInfo() (*MemInfo, error) {
} }
// parseMemInfo parses the /proc/meminfo file into // parseMemInfo parses the /proc/meminfo file into
// a MemInfo object given a io.Reader to the file. // a MemInfo object given an io.Reader to the file.
//
// Throws error if there are problems reading from the file // Throws error if there are problems reading from the file
func parseMemInfo(reader io.Reader) (*MemInfo, error) { func parseMemInfo(reader io.Reader) (*MemInfo, error) {
meminfo := &MemInfo{} meminfo := &MemInfo{}