@@ -213,23 +213,19 @@ func generateConfig(cfgFile string) (err error) {
213213 }
214214 defer f .Close ()
215215 lineEnd := "\n "
216- warnMsg := ""
217216 if runtime .GOOS == "windows" {
218217 lineEnd = "\r \n "
219- warnMsg = " # On Windows, directory slashes need to be doubled up otherwise parsing fails."
220218 }
221- safeChainFile := strings .ReplaceAll (chainFile , `\` , `\\` )
222219 certPath := fmt .Sprintf ("%c%s" , os .PathSeparator , filepath .Join ("path" , "to" , "your" , "certificate" , "here" ))
223- safeCertPath := strings .ReplaceAll (certPath , `\` , `\\` )
224220 _ , err = fmt .Fprint (f , `[certs]` + lineEnd )
225- _ , err = fmt .Fprint (f , fmt .Sprintf (`cachain = "%s" %s` , safeChainFile , lineEnd ))
226- _ , err = fmt .Fprint (f , fmt .Sprintf (`cert = "%s"%s%s ` , safeCertPath , warnMsg , lineEnd ))
221+ _ , err = fmt .Fprint (f , fmt .Sprintf (`cachain = '%s' %s` , chainFile , lineEnd ))
222+ _ , err = fmt .Fprint (f , fmt .Sprintf (`cert = '%s'%s ` , certPath , lineEnd ))
227223 _ , err = fmt .Fprint (f , lineEnd )
228224 _ , err = fmt .Fprint (f , `[general]` + lineEnd )
229- _ , err = fmt .Fprint (f , `cloud = " https://dbhub.io:5550" ` + lineEnd )
225+ _ , err = fmt .Fprint (f , `cloud = ' https://dbhub.io:5550' ` + lineEnd )
230226 _ , err = fmt .Fprint (f , lineEnd )
231227 _ , err = fmt .Fprint (f , `[user]` + lineEnd )
232- _ , err = fmt .Fprint (f , `name = " Your Name" ` + lineEnd )
228+ _ , err = fmt .Fprint (f , `name = ' Your Name' ` + lineEnd )
233229 return
234230}
235231
0 commit comments