@@ -84,7 +84,6 @@ func expandPadding(p []float64, scale float64) []float64 {
8484 return []float64 {p [top ] * scale , p [right ] * scale , p [bottom ] * scale , p [left ] * scale }
8585 default :
8686 return []float64 {0 , 0 , 0 , 0 }
87-
8887 }
8988}
9089
@@ -102,7 +101,7 @@ const (
102101var userConfigPath = filepath .Join (xdg .ConfigHome , "freeze" , "user.json" )
103102
104103func loadUserConfig () (fs.File , error ) {
105- return os .Open (userConfigPath )
104+ return os .Open (userConfigPath ) //nolint: wrapcheck
106105}
107106
108107func saveUserConfig (config Config ) error {
@@ -112,19 +111,19 @@ func saveUserConfig(config Config) error {
112111
113112 err := os .MkdirAll (filepath .Dir (userConfigPath ), os .ModePerm )
114113 if err != nil {
115- return err
114+ return err //nolint: wrapcheck
116115 }
117116 f , err := os .Create (userConfigPath )
118117 if err != nil {
119- return err
118+ return err //nolint: wrapcheck
120119 }
121120 b , err := json .Marshal (config )
122121 if err != nil {
123- return err
122+ return err //nolint: wrapcheck
124123 }
125124 _ , err = f .Write (b )
126125
127126 printFilenameOutput (userConfigPath )
128127
129- return err
128+ return err //nolint: wrapcheck
130129}
0 commit comments