Add testing

This commit is contained in:
Melody Becker 2025-04-14 16:59:59 +02:00
parent 3233f8c27f
commit 06e6d457da
Signed by: mstar
SSH key fingerprint: SHA256:9VAo09aaVNTWKzPW7Hq2LW+ox9OdwmTSHRoD4mlz1yI
14 changed files with 273 additions and 5 deletions

View file

@ -3,6 +3,9 @@ package shared
import "os"
// Copied from https://stackoverflow.com/a/20026945 and https://stackoverflow.com/a/49148866
// Not testable as host environment could be just about anything
// and this function is for testing the host environment.
// Also, Windows is not supported. It may work, it may not, doesn't matter
func IsWritable(path string) bool {
info, err := os.Stat(path)
if err != nil {