eino icon indicating copy to clipboard operation
eino copied to clipboard

fix: misc code quality improvements

Open 123456wda opened this issue 6 months ago • 1 comments

Summary

  • compose/graph.go: Replace errors.New(fmt.Sprintf(...)) with idiomatic fmt.Errorf
  • adk/utils.go: Add empty input guard in concatInstructions to prevent potential index-out-of-bounds panic
  • adk/flow.go: Rename ok_/ok__ variables to descriptive names (isSubAgent, hasNext) for better readability
  • adk/react.go: Extract hardcoded maxIter value 20 to a named constant defaultMaxIterations

Test plan

  • [x] go build ./compose/... ./adk/... passes
  • [x] go test ./compose/... passes
  • [x] go test ./adk/ passes

123456wda avatar May 18 '26 13:05 123456wda

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar May 18 '26 13:05 CLAassistant