@@ -117,7 +117,7 @@ func (opt *postgresOptions) setDatabaseCredentials(appBinding *appcatalog.AppBin
117
117
if ! ok {
118
118
return fmt .Errorf ("can't find client cert" )
119
119
}
120
- if err := ioutil .WriteFile (filepath .Join (opt .setupOptions .ScratchDir , core .TLSCertKey ), certByte , 0600 ); err != nil {
120
+ if err := ioutil .WriteFile (filepath .Join (opt .setupOptions .ScratchDir , core .TLSCertKey ), certByte , 0o600 ); err != nil {
121
121
return err
122
122
}
123
123
@@ -127,12 +127,12 @@ func (opt *postgresOptions) setDatabaseCredentials(appBinding *appcatalog.AppBin
127
127
return fmt .Errorf ("can't find client private key" )
128
128
}
129
129
130
- if err := ioutil .WriteFile (filepath .Join (opt .setupOptions .ScratchDir , core .TLSPrivateKeyKey ), keyByte , 0600 ); err != nil {
130
+ if err := ioutil .WriteFile (filepath .Join (opt .setupOptions .ScratchDir , core .TLSPrivateKeyKey ), keyByte , 0o600 ); err != nil {
131
131
return err
132
132
}
133
133
session .sh .SetEnv (EnvPGSSLKEY , filepath .Join (opt .setupOptions .ScratchDir , core .TLSPrivateKeyKey ))
134
134
135
- //TODO: this one is hard coded here but need to change later
135
+ // TODO: this one is hard coded here but need to change later
136
136
userName = opt .user
137
137
} else {
138
138
// set env for pg_dump/pg_dumpall
@@ -181,7 +181,7 @@ func (session *sessionWrapper) setUserArgs(args string) {
181
181
182
182
func (session * sessionWrapper ) setTLSParameters (appBinding * appcatalog.AppBinding , scratchDir string ) error {
183
183
if appBinding .Spec .ClientConfig .CABundle != nil {
184
- if err := ioutil .WriteFile (filepath .Join (scratchDir , core .ServiceAccountRootCAKey ), appBinding .Spec .ClientConfig .CABundle , 0600 ); err != nil {
184
+ if err := ioutil .WriteFile (filepath .Join (scratchDir , core .ServiceAccountRootCAKey ), appBinding .Spec .ClientConfig .CABundle , 0o600 ); err != nil {
185
185
return err
186
186
}
187
187
session .sh .SetEnv (EnvPGSSLROOTCERT , filepath .Join (scratchDir , core .ServiceAccountRootCAKey ))
0 commit comments