hyprspace/cli/util.go
Jörg Thalheim fc42d2eec0
Fix various linting issues. (#68)
* remove unused vars/functions

* all constants need explicit types

See https://staticcheck.dev/docs/checks/#SA9004

* cli/up: add missing error checks

* server: fix potential race condition of chown when binding listening socket

a process waiting for the socket appear may bind before we can apply
filesystem permissions.
2024-11-17 17:20:01 +00:00

19 lines
270 B
Go

package cli
import (
"fmt"
"os"
"github.com/mattn/go-isatty"
)
func printListF(strings []string, handler func(string) string) {
for _, s := range strings {
fmt.Printf(" %s\n", handler(s))
}
}
func isTTY() bool {
return isatty.IsTerminal(os.Stdout.Fd())
}