Skip to content

Commit

Permalink
Rename read URI
Browse files Browse the repository at this point in the history
  • Loading branch information
dearchap committed Nov 17, 2024
1 parent 85a488c commit bc89bf2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion altsrc.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func tracef(format string, a ...any) {
)
}

func ReadURI(uriString string) ([]byte, error) {
func readURI(uriString string) ([]byte, error) {
u, err := url.Parse(uriString)
if err != nil {
return nil, err
Expand Down
2 changes: 1 addition & 1 deletion file_source_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func NewFileSourceCache[T any](file string, f func([]byte, any) error) *FileSour
func (fsc *FileSourceCache[T]) Get() T {
if fsc.m == nil {
res := new(T)
if b, err := ReadURI(fsc.file); err != nil {
if b, err := readURI(fsc.file); err != nil {
tracef("failed to read uri %[1]q: %[2]v", fsc.file, err)
} else if err := fsc.unmarshaller(b, res); err != nil {
tracef("failed to unmarshal from file %[1]q: %[2]v", fsc.file, err)
Expand Down

0 comments on commit bc89bf2

Please sign in to comment.