Change %q in logs and errors to %#q [Part3]#5029
Conversation
99fdc19 to
98548d5
Compare
| homedir := u.Homedir | ||
| if homedir == "" { | ||
| return fmt.Errorf("homedir is required for user %q", u.Name) | ||
| return fmt.Errorf("homedir is required for user %#qq", u.Name) |
There was a problem hiding this comment.
You have again included a couple of %#qq instances in the PR. How do they happen? Did you create this with AI without checking the output?
There was a problem hiding this comment.
Apologies for the inconvenience, but I have never used AI at all for contributing lima.
Since I modified all codes at once and then divided them into a few PRs, typos the same as before might remain.
I will make sure to double-check not to contain any typos before turning a PR ready for review.
There was a problem hiding this comment.
Fixed all typos and squashed 🙏
jandubois
left a comment
There was a problem hiding this comment.
Thanks, LGTM
I think I would like to see the "fuse to allow_other as user" string changed; I don't care about the other comment. Both are trivial.
| for i, r := range script { | ||
| if !(unicode.IsPrint(r) || r == '\n') { | ||
| return fmt.Sprintf("unprintable character %q at offset %d", r, i) | ||
| return fmt.Sprintf("unprintable character %#q at offset %d", r, i) |
There was a problem hiding this comment.
Doesn't really matter, but the # makes no difference when printing runes, not strings. It will always use single quotes, not backticks.
| }) | ||
| req = append(req, requirement{ | ||
| description: "fuse to \"allow_other\" as user", | ||
| description: "fuse to `allow_other` as user", |
There was a problem hiding this comment.
Using backticks here will put the whole strings in double-quotes, which will look odd because all other progress messages will show backticks. Either leave this with double-quotes for the inner string, or remove the quotes completely.
| description: "fuse to `allow_other` as user", | |
| description: "fuse to allow_other as user", |
Signed-off-by: mie313 <mie313.tanaka@gmail.com>
Change %q in logs and errors to %#q and update the codes so that backticks are used everywhere in logs and errors. (all files in the following directories) .
pkg/guestagentpkg/guestpatchpkg/hostagentpkg/httpclientutilpkg/identifierspkg/imgutilpkg/instancepkg/iso9660utilpkg/limactlutilpkg/limainfopkg/limatmplpkg/limatypeRelated issue: #4898
This PR is a continuation of the work from #4909 and #5017 .