From a1deb9845593e211a1ce6fe4a7f88bbe5acd9981 Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Thu, 27 Apr 2023 22:21:31 -0500 Subject: nocui: simulates button clicks Signed-off-by: Jeff Carr --- cmds/buttonplugin/log.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'cmds/buttonplugin/log.go') diff --git a/cmds/buttonplugin/log.go b/cmds/buttonplugin/log.go index 70039df..13238f4 100644 --- a/cmds/buttonplugin/log.go +++ b/cmds/buttonplugin/log.go @@ -2,12 +2,7 @@ package main import ( - "log" "fmt" - "os" - "io" - "time" - "bufio" arg "github.com/alexflint/go-arg" "git.wit.org/wit/gui" ) @@ -21,14 +16,17 @@ var args struct { gui.GuiArgs } +/* var f1 *os.File var f2 *os.File var err error +*/ func init() { arg.MustParse(&args) fmt.Println(args.Foo, args.Bar, args.User) +/* log.Println() log.Println("STDOUT is now at /tmp/guilogfile") log.Println("STDOUT is now at /tmp/guilogfile") @@ -42,8 +40,10 @@ func init() { log.SetOutput(f1) log.Println("This is a test log entry") +*/ } +/* func captureSTDOUT() { f2, _ = os.OpenFile("/tmp/my.log", os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0664) multiWriter := io.MultiWriter(os.Stderr, f2) @@ -68,3 +68,4 @@ func captureSTDOUT() { // hacky sleep to ensure the go routine can write before program exits time.Sleep(time.Second) } +*/ -- cgit v1.2.3