You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
395B

  1. package statusscreen
  2. import (
  3. "github.com/common-nighthawk/go-figure"
  4. "time"
  5. )
  6. // Clock is my Clock struct
  7. type Clock struct {
  8. Config *Config
  9. }
  10. // GetOutput returns a rendered result of this module
  11. func (clock *Clock) GetOutput() []string {
  12. currentTime := time.Now().Format(clock.Config.Clock.TimeFormat)
  13. myFigure := figure.NewFigure(currentTime, "", true)
  14. return myFigure.Slicify()
  15. }