Signed-off-by: Veres Lajos <vlajos@gmail.com>
This commit is contained in:
Veres Lajos 2015-08-07 23:24:18 +01:00
parent bad3b47438
commit 0f78f158aa
10 changed files with 10 additions and 10 deletions

View file

@ -306,7 +306,7 @@ func PrepareArchiveCopy(srcContent Reader, srcInfo, dstInfo CopyInfo) (dstDir st
} }
// rebaseArchiveEntries rewrites the given srcContent archive replacing // rebaseArchiveEntries rewrites the given srcContent archive replacing
// an occurance of oldBase with newBase at the beginning of entry names. // an occurrence of oldBase with newBase at the beginning of entry names.
func rebaseArchiveEntries(srcContent Reader, oldBase, newBase string) Archive { func rebaseArchiveEntries(srcContent Reader, oldBase, newBase string) Archive {
if oldBase == string(os.PathSeparator) { if oldBase == string(os.PathSeparator) {
// If oldBase specifies the root directory, use an empty string as // If oldBase specifies the root directory, use an empty string as

View file

@ -58,7 +58,7 @@ func UnpackLayer(dest string, layer Reader) (size int64, err error) {
// TODO Windows. Once the registry is aware of what images are Windows- // TODO Windows. Once the registry is aware of what images are Windows-
// specific or Linux-specific, this warning should be changed to an error // specific or Linux-specific, this warning should be changed to an error
// to cater for the situation where someone does manage to upload a Linux // to cater for the situation where someone does manage to upload a Linux
// image but have it tagged as Windows inadvertantly. // image but have it tagged as Windows inadvertently.
if runtime.GOOS == "windows" { if runtime.GOOS == "windows" {
if strings.Contains(hdr.Name, ":") { if strings.Contains(hdr.Name, ":") {
logrus.Warnf("Windows: Ignoring %s (is this a Linux image?)", hdr.Name) logrus.Warnf("Windows: Ignoring %s (is this a Linux image?)", hdr.Name)

View file

@ -307,7 +307,7 @@ func (db *Database) Parents(name string) ([]string, error) {
return db.parents(e) return db.parents(e)
} }
// Refs returns the refrence count for a specified id. // Refs returns the reference count for a specified id.
func (db *Database) Refs(id string) int { func (db *Database) Refs(id string) int {
db.mux.RLock() db.mux.RLock()
defer db.mux.RUnlock() defer db.mux.RUnlock()

View file

@ -243,7 +243,7 @@ func TestAddSelfAsChild(t *testing.T) {
} }
} }
func TestAddChildToNonExistantRoot(t *testing.T) { func TestAddChildToNonExistentRoot(t *testing.T) {
db, dbpath := newTestDb(t) db, dbpath := newTestDb(t)
defer destroyTestDb(dbpath) defer destroyTestDb(dbpath)

View file

@ -233,7 +233,7 @@ func HashData(src io.Reader) (string, error) {
} }
// OnEOFReader wraps a io.ReadCloser and a function // OnEOFReader wraps a io.ReadCloser and a function
// the fuction will run at the end of file or close the file. // the function will run at the end of file or close the file.
type OnEOFReader struct { type OnEOFReader struct {
Rc io.ReadCloser Rc io.ReadCloser
Fn func() Fn func()

View file

@ -1094,7 +1094,7 @@ func (fs *FlagSet) ParseFlags(args []string, withHelp bool) error {
} }
// ReportError is a utility method that prints a user-friendly message // ReportError is a utility method that prints a user-friendly message
// containing the error that occured during parsing and a suggestion to get help // containing the error that occurred during parsing and a suggestion to get help
func (fs *FlagSet) ReportError(str string, withHelp bool) { func (fs *FlagSet) ReportError(str string, withHelp bool) {
if withHelp { if withHelp {
if os.Args[0] == fs.Name() { if os.Args[0] == fs.Name() {

View file

@ -107,7 +107,7 @@ var (
// Homi J Bhabha - was an Indian nuclear physicist, founding director, and professor of physics at the Tata Institute of Fundamental Research. Colloquially known as "father of Indian nuclear programme"- https://en.wikipedia.org/wiki/Homi_J._Bhabha // Homi J Bhabha - was an Indian nuclear physicist, founding director, and professor of physics at the Tata Institute of Fundamental Research. Colloquially known as "father of Indian nuclear programme"- https://en.wikipedia.org/wiki/Homi_J._Bhabha
"bhabha", "bhabha",
// Bhaskara II - Ancient Indian mathematician-astronomer whose work on calculus predates Newton and Leibniz by over half a millenium - https://en.wikipedia.org/wiki/Bh%C4%81skara_II#Calculus // Bhaskara II - Ancient Indian mathematician-astronomer whose work on calculus predates Newton and Leibniz by over half a millennium - https://en.wikipedia.org/wiki/Bh%C4%81skara_II#Calculus
"bhaskara", "bhaskara",
// Elizabeth Blackwell - American doctor and first American woman to receive a medical degree - https://en.wikipedia.org/wiki/Elizabeth_Blackwell // Elizabeth Blackwell - American doctor and first American woman to receive a medical degree - https://en.wikipedia.org/wiki/Elizabeth_Blackwell

View file

@ -45,7 +45,7 @@ func TestWrite(t *testing.T) {
t.Fatalf("Error while writing with StdWrite") t.Fatalf("Error while writing with StdWrite")
} }
if n != len(data) { if n != len(data) {
t.Fatalf("Write should have writen %d byte but wrote %d.", len(data), n) t.Fatalf("Write should have written %d byte but wrote %d.", len(data), n)
} }
} }

View file

@ -1,4 +1,4 @@
// Package tailfile provides helper functinos to read the nth lines of any // Package tailfile provides helper functions to read the nth lines of any
// ReadSeeker. // ReadSeeker.
package tailfile package tailfile

View file

@ -86,7 +86,7 @@ func (ar *ansiReader) Read(p []byte) (int, error) {
ar.buffer = keyBytes[len(p):] ar.buffer = keyBytes[len(p):]
keyBytes = keyBytes[:len(p)] keyBytes = keyBytes[:len(p)]
} else if len(keyBytes) == 0 { } else if len(keyBytes) == 0 {
logger.Debug("No key bytes returned from the translater") logger.Debug("No key bytes returned from the translator")
return 0, nil return 0, nil
} }