MCPcopy Index your code
hub / github.com/cortexlabs/cortex / watchHeader

Function watchHeader

cli/cmd/lib_watch.go:51–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49}
50
51func watchHeader() string {
52 timeStr := libtime.LocalHourNow()
53 width := getTerminalWidth()
54 numExtraChars := 4
55 padding := strings.Repeat(" ", libmath.MaxInt(width-len(_cmdStr)-len(timeStr)-numExtraChars, 0))
56 return fmt.Sprintf("$ %s %s%s", _cmdStr, padding, libtime.LocalHourNow())
57}
58
59func rerun(watchFlag bool, f func() (string, error)) {
60 if watchFlag {

Callers 1

rerunFunction · 0.85

Calls 1

getTerminalWidthFunction · 0.85

Tested by

no test coverage detected