Skip to content

Commit 8f71e9a

Browse files
add debug message
1 parent d7ed04b commit 8f71e9a

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

cmd/configure.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ var configureCmd = &cobra.Command{
1818
}
1919

2020
var defaultColors = map[string]string{
21-
"gray": "8",
22-
"red": "1",
23-
"green": "2",
21+
"gray": "8",
22+
"red": "1",
23+
"green": "2",
24+
"magenta": "5",
2425
}
2526

2627
// configureColorsCmd represents the `configure colors` command for changing

render/render.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ import (
1616
var (
1717
green lipgloss.Style
1818
red lipgloss.Style
19+
magenta lipgloss.Style
1920
gray lipgloss.Style
2021
borderBox = lipgloss.NewStyle().Border(lipgloss.RoundedBorder())
2122
)
2223

2324
func (m rootModel) Init() tea.Cmd {
2425
green = lipgloss.NewStyle().Foreground(lipgloss.Color(viper.GetString("color.green")))
2526
red = lipgloss.NewStyle().Foreground(lipgloss.Color(viper.GetString("color.red")))
27+
magenta = lipgloss.NewStyle().Foreground(lipgloss.Color(viper.GetString("color.magenta")))
2628
gray = lipgloss.NewStyle().Foreground(lipgloss.Color(viper.GetString("color.gray")))
2729
return m.spinner.Tick
2830
}

render/view.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package render
33
import (
44
"fmt"
55
"strings"
6+
"time"
67
"unicode/utf8"
78

89
api "github.com/bootdotdev/bootdev/client"
@@ -174,6 +175,10 @@ func (m rootModel) View() string {
174175
str.WriteString("\n\n" + red.Render("Tests failed! ❌"))
175176
str.WriteString(red.Render(fmt.Sprintf("\n\nFailed Step: %v", m.failure.FailedStepIndex+1)))
176177
str.WriteString(red.Render("\nError: "+m.failure.ErrorMessage) + "\n\n")
178+
currentDate := time.Now().Format("2006-01-02")
179+
if strings.HasSuffix(currentDate, "04-01") {
180+
str.WriteString(magenta.Render(fmt.Sprintf("This incident has been reported to your system administrator. [%s]\n", currentDate)))
181+
}
177182
}
178183

179184
return str.String()

0 commit comments

Comments
 (0)