File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed
Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -18,9 +18,10 @@ var configureCmd = &cobra.Command{
1818}
1919
2020var 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
Original file line number Diff line number Diff line change @@ -16,13 +16,15 @@ import (
1616var (
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
2324func (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}
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package render
33import (
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 \n Failed Step: %v" , m .failure .FailedStepIndex + 1 )))
176177 str .WriteString (red .Render ("\n Error: " + 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 ()
You can’t perform that action at this time.
0 commit comments