mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2025-09-20 18:17:15 +00:00
Fixed Lint errors
This commit is contained in:
parent
297ef0180d
commit
de2c363a4f
|
@ -7,7 +7,10 @@ import (
|
|||
)
|
||||
|
||||
func AppendFile(source string, destination string) error {
|
||||
createDirectoryIfNotPresent(filepath.Dir(destination))
|
||||
err := createDirectoryIfNotPresent(filepath.Dir(destination))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
in, err := os.Open(source)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -34,7 +37,10 @@ func AppendFile(source string, destination string) error {
|
|||
}
|
||||
|
||||
func CopyFile(source string, destination string) error {
|
||||
createDirectoryIfNotPresent(filepath.Dir(destination))
|
||||
err := createDirectoryIfNotPresent(filepath.Dir(destination))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
in, err := os.Open(source)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -61,7 +67,10 @@ func CopyFile(source string, destination string) error {
|
|||
}
|
||||
|
||||
func MoveFile(source string, destination string) error {
|
||||
createDirectoryIfNotPresent(filepath.Dir(destination))
|
||||
err := createDirectoryIfNotPresent(filepath.Dir(destination))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return os.Rename(source, destination)
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ func DebugLazy(getLine func() string) {
|
|||
|
||||
func Debug(format string, a ...any) {
|
||||
if logger.Debug {
|
||||
logger.wrapped.Println(fmt.Sprintf(format, a...))
|
||||
logger.wrapped.Printf(format, a...)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -53,5 +53,5 @@ func Fatal(err error) {
|
|||
|
||||
func Fatalf(format string, a ...any) {
|
||||
fmt.Fprintf(os.Stderr, format+"\n", a...)
|
||||
logger.wrapped.Fatal(fmt.Sprintf(format, a...))
|
||||
logger.wrapped.Fatalf(format, a...)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue