Skip to content

Commit

Permalink
Fix linting issues
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Weinstock <jakobweinstock@gmail.com>
  • Loading branch information
jacobweinstock committed Oct 14, 2024
1 parent f393c1e commit a8e7c14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion internal/deprecated/workflow/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func (s *state) createJob(ctx context.Context, actions []rufio.Action, name jobN
}

// create a new job
hw , err := hardwareFrom(ctx, s.client, s.workflow)
hw, err := hardwareFrom(ctx, s.client, s.workflow)
if err != nil {
return reconcile.Result{}, fmt.Errorf("error getting hardware: %w", err)
}
Expand Down
7 changes: 5 additions & 2 deletions internal/deprecated/workflow/journal/journal.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ func Log(ctx context.Context, msg string, args ...any) {
t := time.Now().UTC().Format(time.RFC3339Nano)
m := make(map[string]any)
for i := 0; i < len(args); i += 2 {
m[args[i].(string)] = args[i+1]
k, ok := args[i].(string)
if !ok {
k = "invalid key"
}
m[k] = args[i+1]
}
e, ok := ctx.Value(Name).(*[]Entry)
if !ok {
e = &[]Entry{{Msg: msg, Args: m, Source: fileAndLine(), Time: t}}
return
}
*e = append(*e, Entry{Msg: msg, Args: m, Source: fileAndLine(), Time: t})
Expand Down

0 comments on commit a8e7c14

Please sign in to comment.