mirror of
https://github.com/hyprspace/hyprspace.git
synced 2026-09-14 02:56:21 +05:00
* 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.
19 lines
270 B
Go
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())
|
|
}
|