func writeParamFile(filename string, cfg interface{}, kind string) (bool, error) {
        err := os.MkdirAll(filepath.Dir(filename), 0775)
        if err != nil {
                return false, err
        }

        f, err := atomicfile.New(filename, 0660)
        if err != nil {
                return false, err
        }
        defer f.Close()

        return encode(f, cfg, kind)
}
// writeParamFile writes the index repository parameters from `cfg` into `filename`.
writeParamFile writes the index repository parameters from `cfg` into `filename`.
// writeParamFile writes the index repository parameters from ` cfg ` into ` filename ` .
func writeParamFile(filename string, cfg interface{}, kind string) (bool, error) {
        err := os.MkdirAll(filepath.Dir(filename), 0775)
        if err != nil {
                return false, err
        }
        f, err := atomicfile.New(filename, 0660)
        if err != nil {
                return false, err
        }
        defer f.Close()
        return encode(f, cfg, kind)
}
func writeParamFile ( filename string , cfg interface { } , kind string ) ( bool , error ) { err := os . MkdirAll ( filepath . Dir ( filename ) , 0775 ) if err != nil { return false , err } f , err := atomicfile . New ( filename , 0660 ) if err != nil { return false , err } defer f . Close ( ) return encode ( f , cfg , kind ) }
writeParamFile writes the index repository parameters from `cfg` into `filename`.
writeParamFile writes the index repository parameters from ` cfg ` into ` filename ` .