Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions goss_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,12 @@ func (c *GossConfig) Merge(g2 GossConfig) {
}

func mergeType[V any](m map[string]V, t, k string, v V) {
if _, ok := m[k]; ok {
log.Printf("[WARN] Duplicate key detected: '%s: %s'. The value from a later-loaded goss file has overwritten the previous value.", t, k)
}
m[k] = v
if _, ok := m[k]; ok {
log.Printf("[WARN] Duplicate key detected: '%s: %s'. The value from a later-loaded goss file has overwritten the previous value.", t, k)
}
m[k] = v
}


func (c *GossConfig) Resources() []resource.Resource {
var tests []resource.Resource

Expand Down
4 changes: 2 additions & 2 deletions system/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ func (c *DefCommand) setup() error {
stdoutB := cmd.Stdout.Bytes()
stderrB := cmd.Stderr.Bytes()
id := c.Ctx.Value("id")
logBytes(stdoutB, fmt.Sprintf("Command: %s: stdout: ", id))
logBytes(stderrB, fmt.Sprintf("Command: %s: stderr: ", id))
logBytes(stdoutB, fmt.Sprintf("[Command][%s][stdout] ", id))
logBytes(stderrB, fmt.Sprintf("[Command][%s][stderr] ", id))
c.stdout = bytes.NewReader(stdoutB)
c.stderr = bytes.NewReader(stderrB)

Expand Down
2 changes: 1 addition & 1 deletion system/log.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ func logBytes(b []byte, prefix string) {
}
lines := bytes.Split(b, []byte("\n"))
for _, l := range lines {
log.Printf("[DEBUG] %s %s", prefix, l)
log.Printf("[DEBUG]%s %s", prefix, l)
}
}
2 changes: 1 addition & 1 deletion util/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func NewConfig(opts ...ConfigOption) (rc *Config, err error) {
DisabledResourceTypes: []string{},
ListenAddress: ":8080",
LocalAddress: "",
LogLevel: "FATAL",
LogLevel: "ERROR",
MaxConcurrent: 50,
NoColor: nil,
NoFollowRedirects: false,
Expand Down