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.
 
 
 
statusscreen/src/clock/clock.go

20 lines
408 B

package clock
import (
"../config"
"github.com/common-nighthawk/go-figure"
"time"
)
// Clock is my Clock struct
type Clock struct {
Config *config.Config
}
// GetOutput returns a rendered result of this module
func (clock *Clock) GetOutput() []string {
currentTime := time.Now().Format(clock.Config.Clock.TimeFormat)
myFigure := figure.NewFigure(currentTime, "", true)
return myFigure.Slicify()
}