code: 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
  }
docs: // openDBFile opens a file.