Fixed styling of the other tools

This commit is contained in:
Leon Mika 2022-06-27 16:05:59 +10:00
parent 809f9adfea
commit eadf8d1720
19 changed files with 231 additions and 105 deletions

View file

@ -7,14 +7,15 @@ import (
"github.com/charmbracelet/lipgloss"
"github.com/lmika/awstools/internal/common/ui/commandctrl"
"github.com/lmika/awstools/internal/common/ui/logging"
"github.com/lmika/awstools/internal/slog-view/services/logreader"
"github.com/lmika/awstools/internal/slog-view/controllers"
"github.com/lmika/awstools/internal/slog-view/services/logreader"
"github.com/lmika/awstools/internal/slog-view/ui"
"github.com/lmika/gopkgs/cli"
"os"
)
func main() {
var flagDebug = flag.String("debug", "", "file to log debug messages")
flag.Parse()
if flag.NArg() == 0 {
@ -24,7 +25,7 @@ func main() {
// Pre-determine if layout has dark background. This prevents calls for creating a list to hang.
lipgloss.HasDarkBackground()
closeFn := logging.EnableLogging()
closeFn := logging.EnableLogging(*flagDebug)
defer closeFn()
service := logreader.NewService()

View file

@ -2,6 +2,7 @@ package main
import (
"context"
"flag"
"fmt"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/ssm"
@ -18,10 +19,13 @@ import (
)
func main() {
var flagDebug = flag.String("debug", "", "file to log debug messages")
flag.Parse()
// Pre-determine if layout has dark background. This prevents calls for creating a list to hang.
lipgloss.HasDarkBackground()
closeFn := logging.EnableLogging()
closeFn := logging.EnableLogging(*flagDebug)
defer closeFn()
cfg, err := config.LoadDefaultConfig(context.Background())