update linter config, satisfy linter (#28)

This commit is contained in:
T. von Dein
2026-08-31 22:06:25 +02:00
parent 5c9900d985
commit 1d45b2c6fe
24 changed files with 331 additions and 221 deletions

View File

@@ -1,3 +1,5 @@
package app
/*
Copyright © 2024 Thomas von Dein
@@ -14,18 +16,24 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package app
import "os"
import (
"errors"
"os"
)
func cleanError(file string, err error) error {
// remove given [backup] file and forward the given error
return os.Remove(file)
oserr := os.Remove(file)
if oserr != nil {
return errors.Join(err, oserr)
}
return err
}
func fileExists(filename string) bool {
info, err := os.Stat(filename)
if err != nil {
// return false on any error
return false