Skip to content

Commit

Permalink
Merge branch 'main' into content
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoreilly committed Jan 16, 2025
2 parents 183e1f9 + 8950364 commit 89a6ae8
Show file tree
Hide file tree
Showing 24 changed files with 123 additions and 114 deletions.
2 changes: 1 addition & 1 deletion base/fileinfo/fileinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ func (fi *FileInfo) Filenames(names *[]string) (err error) {
// Does not actually do the renaming -- see Rename method.
func (fi *FileInfo) RenamePath(path string) (newpath string, err error) {
if path == "" {
err = fmt.Errorf("core.Rename: new name is empty")
err = errors.New("core.Rename: new name is empty")
log.Println(err)
return path, err
}
Expand Down
3 changes: 2 additions & 1 deletion base/iox/imagex/imagex.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ package imagex

import (
"bufio"
"errors"
"fmt"
"image"
"image/draw"
Expand Down Expand Up @@ -43,7 +44,7 @@ const (
// which can start with a . or not
func ExtToFormat(ext string) (Formats, error) {
if len(ext) == 0 {
return None, fmt.Errorf("ExtToFormat: ext is empty")
return None, errors.New("ExtToFormat: ext is empty")
}
if ext[0] == '.' {
ext = ext[1:]
Expand Down
4 changes: 2 additions & 2 deletions base/iox/tomlx/tomlx.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
package tomlx

import (
"fmt"
"errors"
"io"
"io/fs"

Expand Down Expand Up @@ -77,7 +77,7 @@ func WriteBytes(v any) ([]byte, error) {
func OpenFromPaths(v any, file string, paths ...string) error {
filenames := fsx.FindFilesOnPaths(paths, file)
if len(filenames) == 0 {
return fmt.Errorf("OpenFromPaths: no files found")
return errors.New("OpenFromPaths: no files found")
}
return Open(v, filenames[0])
}
Loading

0 comments on commit 89a6ae8

Please sign in to comment.