Skip to content

Commit 8cfe0c7

Browse files
committed
refactor: Adjust phrasing in log and error messages
Changes include minor grammatical adjustments (such as adding missing prepositions) and rephrasing for improved readability and consistency. Signed-off-by: Chris Henzie <chrishenzie@google.com>
1 parent e597e78 commit 8cfe0c7

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

pkg/adaptation/plugin.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func (r *Adaptation) newLaunchedPlugin(dir, idx, base, cfg string) (p *plugin, r
155155
}
156156

157157
if err = p.cmd.Start(); err != nil {
158-
return nil, fmt.Errorf("failed launch plugin %q: %w", p.name(), err)
158+
return nil, fmt.Errorf("failed to launch plugin %q: %w", p.name(), err)
159159
}
160160

161161
if err = p.connect(conn); err != nil {
@@ -281,7 +281,7 @@ func (p *plugin) connect(conn stdnet.Conn) (retErr error) {
281281

282282
p.pid, err = getPeerPid(p.mux.Trunk())
283283
if err != nil {
284-
log.Warnf(noCtx, "failed to determine plugin pid pid: %v", err)
284+
log.Warnf(noCtx, "failed to determine plugin pid: %v", err)
285285
}
286286

287287
api.RegisterRuntimeService(p.rpcs, p)
@@ -403,11 +403,11 @@ func (p *plugin) qualifiedName() string {
403403
func (p *plugin) RegisterPlugin(ctx context.Context, req *RegisterPluginRequest) (*RegisterPluginResponse, error) {
404404
if p.isExternal() {
405405
if req.PluginName == "" {
406-
p.regC <- fmt.Errorf("plugin %q registered empty name", p.qualifiedName())
406+
p.regC <- fmt.Errorf("plugin %q registered with an empty name", p.qualifiedName())
407407
return &RegisterPluginResponse{}, errors.New("invalid (empty) plugin name")
408408
}
409409
if err := api.CheckPluginIndex(req.PluginIdx); err != nil {
410-
p.regC <- fmt.Errorf("plugin %q registered invalid index: %w", req.PluginName, err)
410+
p.regC <- fmt.Errorf("plugin %q registered with an invalid index: %w", req.PluginName, err)
411411
return &RegisterPluginResponse{}, fmt.Errorf("invalid plugin index: %w", err)
412412
}
413413
p.base = req.PluginName

pkg/adaptation/plugin_linux.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func getPeerPid(conn stdnet.Conn) (int, error) {
3737

3838
raw, err := uc.SyscallConn()
3939
if err != nil {
40-
return 0, fmt.Errorf("failed get raw unix domain connection: %w", err)
40+
return 0, fmt.Errorf("failed to get raw unix domain connection: %w", err)
4141
}
4242

4343
ctrlErr := raw.Control(func(fd uintptr) {

0 commit comments

Comments
 (0)