cerca

lean forum software (pmc local branch)
Log | Files | Refs | README | LICENSE

commit 0bb1af1d08e8f926ad74c86c783d200b9357329e
parent 54b87652d7cc0f708003ad12893f946e62dc6319
Author: Alexander Cobleigh <cblgh@cblgh.org>
Date:   Tue, 10 Sep 2024 18:02:28 +0200

Merge pull request #78 from decentral1se/io-fs-usage

fix: us os instead of io/fs
Diffstat:
Mutil/util.go | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/util/util.go b/util/util.go @@ -8,7 +8,6 @@ import ( "errors" "fmt" "html/template" - "io/fs" "log" "net/http" "net/url" @@ -176,7 +175,7 @@ func CreateIfNotExist(docpath, content string) (bool, error) { _, err = os.Stat(docpath) if err != nil { // if the file doesn't exist, create it - if errors.Is(err, fs.ErrNotExist) { + if errors.Is(err, os.ErrNotExist) { err = os.WriteFile(docpath, []byte(content), 0777) if err != nil { return false, err