chore: fix misspelled words from goreportcard

This commit is contained in:
Kai Armstrong 2022-10-05 15:50:43 -05:00
parent 36aafe2058
commit b417b30284
5 changed files with 8 additions and 8 deletions

View File

@ -35,7 +35,7 @@ const (
// Follows the format officially supported by GitLab // Follows the format officially supported by GitLab
// https://docs.gitlab.com/ee/user/project/description_templates.html#setting-a-default-template-for-issues-and-merge-requests. // https://docs.gitlab.com/ee/user/project/description_templates.html#setting-a-default-template-for-issues-and-merge-requests.
// //
// TODO: load from remote repository if repo is overriden by -R flag // TODO: load from remote repository if repo is overridden by -R flag
func LoadGitLabTemplate(tmplType, tmplName string) (string, error) { func LoadGitLabTemplate(tmplType, tmplName string) (string, error) {
wdir, err := git.ToplevelDir() wdir, err := git.ToplevelDir()
if err != nil { if err != nil {

View File

@ -14,7 +14,7 @@ import (
func Test_WriteFile(t *testing.T) { func Test_WriteFile(t *testing.T) {
dir, err := ioutil.TempDir("", "") dir, err := ioutil.TempDir("", "")
if err != nil { if err != nil {
t.Skipf("unexpected error while creating temporay directory = %s", err) t.Skipf("unexpected error while creating temporary directory = %s", err)
} }
t.Cleanup(func() { t.Cleanup(func() {
os.RemoveAll(dir) os.RemoveAll(dir)

View File

@ -81,15 +81,15 @@ func (r *ResolvedRemotes) BaseRepo(interactive bool) (Interface, error) {
} }
return NewWithHost(repo.RepoOwner(), repo.RepoName(), r.RepoHost()), nil return NewWithHost(repo.RepoOwner(), repo.RepoName(), r.RepoHost()), nil
} else if r.Resolved != "" && !strings.HasPrefix(r.Resolved, "head") { } else if r.Resolved != "" && !strings.HasPrefix(r.Resolved, "head") {
// Backward compatibility kludge for remoteless resolutions created before // Backward compatibility kludge for remote-less resolutions created before
// BaseRepo started creeating resolutions prefixed with `base:` // BaseRepo started creating resolutions prefixed with `base:`
repo, err := FromFullName(r.Resolved) repo, err := FromFullName(r.Resolved)
if err != nil { if err != nil {
return nil, err return nil, err
} }
// Rewrite resolution, ignore the error as this will keep working // Rewrite resolution, ignore the error as this will keep working
// in the future we might add a warning that we couldn't rewrite // in the future we might add a warning that we couldn't rewrite
// it for compatiblity // it for compatibility
_ = git.SetRemoteResolution(r.Name, "base:"+r.Resolved) _ = git.SetRemoteResolution(r.Name, "base:"+r.Resolved)
return NewWithHost(repo.RepoOwner(), repo.RepoName(), r.RepoHost()), nil return NewWithHost(repo.RepoOwner(), repo.RepoName(), r.RepoHost()), nil

View File

@ -221,7 +221,7 @@ func Test(t *testing.T) {
expected: "a value is required", expected: "a value is required",
}, },
{ {
name: "invalid/has-foward-slash", name: "invalid/has-forward-slash",
hostname: "local/host", hostname: "local/host",
expected: "invalid hostname", expected: "invalid hostname",
}, },

View File

@ -54,7 +54,7 @@ type TableCell struct {
type TableRow struct { type TableRow struct {
Cells []*TableCell Cells []*TableCell
// Separator is the seperator for columns in the table. Default is " " // Separator is the separator for columns in the table. Default is " "
Separator string Separator string
} }
@ -177,7 +177,7 @@ func (r *TableRow) String() string {
} }
} }
// allocate a two-dimentional array of cells for each line and add size them // allocate a two-dimensional array of cells for each line and add size them
cells := make([][]*TableCell, lc) cells := make([][]*TableCell, lc)
for x := 0; x < lc; x++ { for x := 0; x < lc; x++ {
cells[x] = make([]*TableCell, len(r.Cells)) cells[x] = make([]*TableCell, len(r.Cells))