diff --git a/src/cmd/go/internal/modload/vendor.go b/src/cmd/go/internal/modload/vendor.go
index bf0c4e4..1fc20ad 100644
--- a/src/cmd/go/internal/modload/vendor.go
+++ b/src/cmd/go/internal/modload/vendor.go
@@ -188,7 +188,7 @@
// However, we can at least detect a version mismatch if packages were
// vendored from a non-matching version.
if vv, ok := vendorVersion[r.Mod.Path]; ok && vv != r.Mod.Version {
- vendErrorf(r.Mod, fmt.Sprintf("is explicitly required in go.mod, but vendor/modules.txt indicates %s@%s", r.Mod.Path, vv))
+ vendErrorf(r.Mod, "is explicitly required in go.mod, but vendor/modules.txt indicates %s@%s", r.Mod.Path, vv)
}
} else {
vendErrorf(r.Mod, "is explicitly required in go.mod, but not marked as explicit in vendor/modules.txt")
diff --git a/src/cmd/internal/obj/loong64/asm.go b/src/cmd/internal/obj/loong64/asm.go
index ccf093c..5a61aca 100644
--- a/src/cmd/internal/obj/loong64/asm.go
+++ b/src/cmd/internal/obj/loong64/asm.go
@@ -4438,7 +4438,7 @@
}
}
- c.ctxt.Diag("bad class combination: %s %d,%s\n", a, fclass, tclass)
+ c.ctxt.Diag("bad class combination: %s %d,%d\n", a, fclass, tclass)
return 0
}
diff --git a/src/cmd/internal/obj/riscv/obj.go b/src/cmd/internal/obj/riscv/obj.go
index 4a9c54a..74699cc 100644
--- a/src/cmd/internal/obj/riscv/obj.go
+++ b/src/cmd/internal/obj/riscv/obj.go
@@ -2991,7 +2991,7 @@
func (ins *instruction) validate(ctxt *obj.Link) {
enc, err := encodingForAs(ins.as)
if err != nil {
- ctxt.Diag(err.Error())
+ ctxt.Diag("%v", err)
return
}
enc.validate(ctxt, ins)