Skip to content

Commit 8b11cf9

Browse files
Resolve init goroutine issue (#313)
* add --ai flag for smurf selm * minor change Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * added context in ai Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> * fix/remove unwanted context * Revert "added context in ai" This reverts commit dc76da7. * fix/update code suggested by solar qube * fix: smurf stf apply logs * fix: smurf stf plan --out flag update * fix: update smurf terraform provision command * fix/Update the code based on suggestions from Gemini AI * feat/update CHANGELOG.md files * feat/update CHANGELOG.md files * fix/ resolve init goroutine issue * fix/minor changes --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 5682123 commit 8b11cf9

File tree

3 files changed

+39
-2
lines changed

3 files changed

+39
-2
lines changed

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,33 @@ All notable and important changes to **Smurf Tool** are documented here.
44

55
---
66

7+
## [v0.0.9] — 2025-11-26
8+
### Added
9+
- Add smurf sdkr for google cloud platform(GCP)
10+
- Add history max flag for smurf selm
11+
- Add GHCR repo feature
12+
- Add `smurf deploy` command
13+
- add smurf selm init command
14+
15+
### Fixed
16+
- Update `smurf stf format` command
17+
- Update smurf provision GHCR logs
18+
- Improve code suggested by Gemini AI
19+
20+
---
21+
22+
## [v0.0.8] — 2025-11-11
23+
### Added
24+
- Add smurf terraform
25+
- Added commands to manage Terraform operations (plan, apply, destroy) using Smurf.
26+
27+
### Fixed
28+
- Removed duplicate logic detected by SonarQube Cloud.
29+
- Update docs with latest changes
30+
- Improve code suggested by Gemini AI
31+
32+
---
33+
734
## [v0.0.7] — 2025-11-04
835
### Added
936
- Introduced **GitHub Container Registry (GHCR)** support.
@@ -70,3 +97,4 @@ All notable and important changes to **Smurf Tool** are documented here.
7097
- commands
7198
- `smurf sdkr --help`
7299
- `smurf selm --help`
100+

go.mod

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ require (
123123
github.com/rubenv/sql-migrate v1.8.0 // indirect
124124
github.com/russross/blackfriday/v2 v2.1.0 // indirect
125125
github.com/santhosh-tekuri/jsonschema/v6 v6.0.2 // indirect
126+
github.com/sashabaranov/go-openai v1.41.2 // indirect
126127
github.com/shopspring/decimal v1.4.0 // indirect
127128
github.com/sirupsen/logrus v1.9.3 // indirect
128129
github.com/spf13/cast v1.7.0 // indirect

internal/terraform/tfInit.go

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,15 @@ func (l *CustomLogger) Write(p []byte) (n int, err error) {
2525
switch {
2626
case strings.Contains(msg, "Downloading"):
2727
parts := strings.Fields(msg)
28-
if len(parts) >= 4 {
29-
Info("Downloading %s %s for %s...", pterm.Cyan(parts[1]), pterm.Yellow(parts[2]), pterm.Cyan(strings.TrimSpace(parts[4])))
28+
// Check for enough parts to safely access indices
29+
if len(parts) >= 5 { // Changed from >= 4 to >= 5 since we need parts[4]
30+
Info("Downloading %s %s for %s...",
31+
pterm.Cyan(parts[1]),
32+
pterm.Yellow(parts[2]),
33+
pterm.Cyan(strings.TrimSpace(parts[4])))
34+
} else {
35+
// Fallback to generic message if format doesn't match
36+
Info("Downloading: %s", strings.TrimSpace(msg))
3037
}
3138
return len(p), nil
3239

@@ -54,6 +61,7 @@ func (l *CustomLogger) Write(p []byte) (n int, err error) {
5461
return len(p), nil
5562
}
5663

64+
// For any other output, write it as-is
5765
return l.writer.Write(p)
5866
}
5967

0 commit comments

Comments
 (0)