Skip to content

Commit 3988f4f

Browse files
rogpeppemvdan
authored andcommitted
fix vet fmt mismatch errors
The latest Go version picks up these format string mismatches, so fix them. Signed-off-by: Roger Peppe <[email protected]> Change-Id: I80a3779e569122950e30e572942b05ad69acf868 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1200762 Unity-Result: CUE porcuepine <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Reviewed-by: Daniel Martí <[email protected]>
1 parent 3413f77 commit 3988f4f

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

Diff for: cue/load/tags.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ func findTags(b *build.Instance) (tags []*tag, errs errors.Error) {
241241
if f, ok := n.(*ast.Field); ok {
242242
for _, a := range f.Attrs {
243243
if key, _ := a.Split(); key == "tag" {
244-
errs = errors.Append(errs, errors.Newf(a.Pos(), msg))
244+
errs = errors.Append(errs, errors.Newf(a.Pos(), "%s", msg))
245245
// TODO: add position of x.
246246
}
247247
}

Diff for: internal/core/compile/compile.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ func (c *compiler) parse(l *ast.BasicLit) (n adt.Expr) {
10661066
case token.STRING:
10671067
info, nStart, _, err := literal.ParseQuotes(s, s)
10681068
if err != nil {
1069-
return c.errf(l, err.Error())
1069+
return c.errf(l, "%s", err.Error())
10701070
}
10711071
s := s[nStart:]
10721072
return parseString(c, l, info, s)

Diff for: internal/golangorgx/gopls/cache/view.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ func (s *Snapshot) initialize(ctx context.Context, firstAttempt bool) {
747747
}
748748
case len(modDiagnostics) > 0:
749749
initialErr = &InitializationError{
750-
MainError: fmt.Errorf(modDiagnostics[0].Message),
750+
MainError: fmt.Errorf("%s", modDiagnostics[0].Message),
751751
}
752752
}
753753

Diff for: internal/golangorgx/gopls/test/integration/fake/editor.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ func (e *Editor) SaveBufferWithoutActions(ctx context.Context, path string) erro
637637
defer e.mu.Unlock()
638638
buf, ok := e.buffers[path]
639639
if !ok {
640-
return fmt.Errorf(fmt.Sprintf("unknown buffer: %q", path))
640+
return fmt.Errorf("unknown buffer: %q", path)
641641
}
642642
content := buf.text()
643643
includeText := false

0 commit comments

Comments
 (0)