user/file.go
func openDBFile(filename string, flag int) (*dbfile, error) {
	f, err := os.OpenFile(filename, flag, 0)
	if err != nil {
		return nil, err
	}

	db := &dbfile{file: f, rd: bufio.NewReader(f)}
	db.Lock()
	return db, nil
}
func openDBFile(filename string, flag int) (*dbfile, error) {
	f, err := os.OpenFile(filename, flag, 0)
	if err != nil {
		return nil, err
	}

	db := &dbfile{file: f, rd: bufio.NewReader(f)}
	db.Lock()
	return db, nil
}
func openDBFile ( filename string , flag int ) ( * dbfile , error ) { f , err := os . OpenFile ( filename , flag , 0 ) if err != nil { return nil , err } db := & dbfile { file : f , rd : bufio . NewReader ( f ) } db . Lock ( ) return db , nil }
// openDBFile opens a file.
openDBFile opens a file .