mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 18:43:34 +00:00
cleanup: use os.WriteFile to write files
as ioutil.WriteFile is deprecated and suggestion is to use os.WriteFile as per https://pkg.go.dev/io/ioutil updating the same. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
15ed9709d4
commit
562dff0d19
@ -17,7 +17,6 @@ limitations under the License.
|
||||
package util
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
)
|
||||
|
||||
@ -57,7 +56,7 @@ func WriteCephConfig() error {
|
||||
|
||||
// create config file if it does not exist to support backward compatibility
|
||||
if _, err = os.Stat(CephConfigPath); os.IsNotExist(err) {
|
||||
err = ioutil.WriteFile(CephConfigPath, cephConfig, 0o600)
|
||||
err = os.WriteFile(CephConfigPath, cephConfig, 0o600)
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user