20 lines
387 B
Go
20 lines
387 B
Go
package main
|
|
|
|
import (
|
|
"github.com/common-nighthawk/go-figure"
|
|
"time"
|
|
)
|
|
|
|
// Clock is my Clock struct
|
|
type Clock struct {
|
|
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()
|
|
}
|