ssm-browse: new utility to browse SSM parameters
This is more of an exercise to work out how best to use controllers
This commit is contained in:
parent
46be54b5fb
commit
0b745a6dfa
14 changed files with 348 additions and 5 deletions
|
|
@ -1,8 +1,12 @@
|
|||
package events
|
||||
|
||||
import tea "github.com/charmbracelet/bubbletea"
|
||||
import (
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"log"
|
||||
)
|
||||
|
||||
func Error(err error) tea.Msg {
|
||||
log.Println(err)
|
||||
return ErrorMsg(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
18
internal/common/ui/logging/debug.go
Normal file
18
internal/common/ui/logging/debug.go
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
package logging
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
tea "github.com/charmbracelet/bubbletea"
|
||||
"os"
|
||||
)
|
||||
|
||||
func EnableLogging() (closeFn func()) {
|
||||
f, err := tea.LogToFile("debug.log", "debug")
|
||||
if err != nil {
|
||||
fmt.Println("fatal:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return func() {
|
||||
f.Close()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue