all: fix typo ("identifer" → "identifier")

Change-Id: Ib61b94136923ec74154ff56c5237bea1877c8f14
Reviewed-on: https://go-review.googlesource.com/c/tools/+/207843
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Anthony Fok 2019-11-19 13:32:09 -07:00 committed by Rebecca Stambler
parent 6d480e29d4
commit dc59f20efa
4 changed files with 4 additions and 4 deletions

View File

@ -330,7 +330,7 @@ func (p *parser) parseConstValue(pkg *types.Package) (val constant.Value, typ ty
if p.tok == '$' {
p.next()
if p.tok != scanner.Ident {
p.errorf("expected identifer after '$', got %s (%q)", scanner.TokenString(p.tok), p.lit)
p.errorf("expected identifier after '$', got %s (%q)", scanner.TokenString(p.tok), p.lit)
}
}

View File

@ -288,7 +288,7 @@ func foreachLine(in []byte, fn func(line []byte)) {
var commentPrefix = []byte(`<span class="comment">// `)
// linkedField determines whether the given line starts with an
// identifer in the provided ids map (mapping from identifier to the
// identifier in the provided ids map (mapping from identifier to the
// same identifier). The line can start with either an identifier or
// an identifier in a comment. If one matches, it returns the
// identifier that matched. Otherwise it returns the empty string.

View File

@ -55,7 +55,7 @@ func (c *completer) structFieldSnippet(label, detail string) *snippet.Builder {
// functionCallSnippets calculates the snippet for function calls.
func (c *completer) functionCallSnippet(name string, params []string) *snippet.Builder {
// If there is no suffix then we need to reuse existing call parens
// "()" if present. If there is an identifer suffix then we always
// "()" if present. If there is an identifier suffix then we always
// need to include "()" since we don't overwrite the suffix.
if c.surrounding != nil && c.surrounding.Suffix() == "" && len(c.path) > 1 {
// If we are the left side (i.e. "Fun") part of a call expression,

View File

@ -168,7 +168,7 @@ func (i *IdentifierInfo) Rename(ctx context.Context, newName string) (map[span.U
return result, nil
}
// getPkgName gets the pkg name associated with an identifer representing
// getPkgName gets the pkg name associated with an identifier representing
// the import path in an import spec.
func (i *IdentifierInfo) getPkgName(ctx context.Context) (*IdentifierInfo, error) {
ph, err := i.pkg.File(i.URI())