Skip to content

Commit

Permalink
(feat) vup
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincobain2000 committed Aug 1, 2024
1 parent 78af252 commit 8ff8143
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 8 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.3
require (
github.com/glebarez/go-sqlite v1.22.0
github.com/jasonlvhit/gocron v0.0.1
github.com/kevincobain2000/go-msteams v1.1.0
github.com/kevincobain2000/go-msteams v1.1.1
github.com/lmittmann/tint v1.0.5
github.com/mattn/go-isatty v0.0.20
github.com/stretchr/testify v1.9.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ github.com/kevincobain2000/go-msteams v1.0.1 h1:EXwMHSrmvV3k6WKL3MotAqkBWta85bq5
github.com/kevincobain2000/go-msteams v1.0.1/go.mod h1:+HowoQQHg9HLfx3CYQGImGGYw20+kN9rFmUXgxrqBzo=
github.com/kevincobain2000/go-msteams v1.1.0 h1:r2Q/Ug2ZGQclDHzIfppyfB4FPjAcDjNIti3WmI91VTo=
github.com/kevincobain2000/go-msteams v1.1.0/go.mod h1:+HowoQQHg9HLfx3CYQGImGGYw20+kN9rFmUXgxrqBzo=
github.com/kevincobain2000/go-msteams v1.1.1 h1:vZ8AYvVmiCdC+VZwsw7RFhb89RG/GasX9kvbdKheFN4=
github.com/kevincobain2000/go-msteams v1.1.1/go.mod h1:+HowoQQHg9HLfx3CYQGImGGYw20+kN9rFmUXgxrqBzo=
github.com/lmittmann/tint v1.0.5 h1:NQclAutOfYsqs2F1Lenue6OoWCajs5wJcP3DfWVpePw=
github.com/lmittmann/tint v1.0.5/go.mod h1:HIS3gSy7qNwGCj+5oRjAutErFBl4BzdQP6cJZ0NfMwE=
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
Expand Down
32 changes: 25 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,31 @@ func notify(errorCount int, firstLine, lastLine string) {
}

slog.Info("Sending to MS Teams")
details := map[string]string{
"Match Pattern": f.match,
"Ignore Pattern": f.ignore,
"Min Errors Threshold": fmt.Sprintf("%d", f.min),
"Total Errors Found": fmt.Sprintf("%d", errorCount),
"First Line": firstLine,
"Last Line": lastLine,
details := []gmt.Details{
{
Label: "Match Pattern",
Message: f.match,
},
{
Label: "Ignore Pattern",
Message: f.ignore,
},
{
Label: "Min Errors Threshold",
Message: fmt.Sprintf("%d", f.min),
},
{
Label: "Total Errors Found",
Message: fmt.Sprintf("%d", errorCount),
},
{
Label: "First Line",
Message: firstLine,
},
{
Label: "Last Line",
Message: lastLine,
},
}

hostname, _ := os.Hostname()
Expand Down

0 comments on commit 8ff8143

Please sign in to comment.