From 44772c121bb7838819d3ba4a7e84c0c2d617328e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaime=20Pi=C3=B1a?= Date: Mon, 5 Dec 2016 15:37:37 -0800 Subject: [PATCH] Fix small lint & spelling issues --- encoding.go | 2 +- mkinfo.go | 8 ++++---- screen.go | 2 +- simulation.go | 2 +- terminfo.go | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/encoding.go b/encoding.go index f4ce8e1..596a6e8 100644 --- a/encoding.go +++ b/encoding.go @@ -46,7 +46,7 @@ var encodingFallback EncodingFallback = EncodingFallbackFail // Aliases can be registered as well, for example "8859-15" could be an alias // for "ISO8859-15". // -// For POSIX systems, the tcell pacakge will check the environment variables +// For POSIX systems, the tcell package will check the environment variables // LC_ALL, LC_CTYPE, and LANG (in that order) to determine the character set. // These are expected to have the following pattern: // diff --git a/mkinfo.go b/mkinfo.go index a628def..8d2db01 100644 --- a/mkinfo.go +++ b/mkinfo.go @@ -93,8 +93,8 @@ func setupterm(name string) error { } plist = append(plist, "") rsn := C.int(0) - - for _, p := range(plist) { + + for _, p := range plist { // Override environment if p == "" { os.Unsetenv("TERMINFO") @@ -145,7 +145,7 @@ func getinfo(name string) (*tcell.Terminfo, error) { if strings.HasSuffix(name, "-truecolor") { base := name[:len(name)-len("-truecolor")] // Probably -256color is closest to what we want - if err = setupterm(base+"-256color"); err != nil { + if err = setupterm(base + "-256color"); err != nil { err = setupterm(base) } if err == nil { @@ -638,7 +638,7 @@ func main() { } } else { tdata[t.Name] = t - if t2, e := getinfo(term+"-256color"); e == nil { + if t2, e := getinfo(term + "-256color"); e == nil { tdata[t2.Name] = t2 } } diff --git a/screen.go b/screen.go index 7b13e15..9551af6 100644 --- a/screen.go +++ b/screen.go @@ -133,7 +133,7 @@ type Screen interface { Sync() // CharacterSet returns information about the character set. - // This isn't the full locale, but it does give us the input/ouput + // This isn't the full locale, but it does give us the input/output // character set. Note that this is just for diagnostic purposes, // we normally translate input/output to/from UTF-8, regardless of // what the user's environment is. diff --git a/simulation.go b/simulation.go index f9dcc1e..7398023 100644 --- a/simulation.go +++ b/simulation.go @@ -417,7 +417,7 @@ outer: continue } - return failed == false + return !failed } func (s *simscreen) Sync() { diff --git a/terminfo.go b/terminfo.go index 2ad4fef..26b3a65 100644 --- a/terminfo.go +++ b/terminfo.go @@ -725,7 +725,7 @@ func loadFromFile(fname string, term string) (*Terminfo, error) { } } -// LookupTerminfo attemps to find a definition for the named $TERM. +// LookupTerminfo attempts to find a definition for the named $TERM. // It first looks in the builtin database, which should cover just about // everyone. If it can't find one there, then it will attempt to read // one from the JSON file located in either $TCELLDB, $HOME/.tcelldb