code: func NewLogFile(name string, file *os.File) (*LogFile, error) {
  	rw := &LogFile{
  		file: file,
  		name: name,
  	}
  	if file == nil {
  		if err := rw.Rotate(); err != nil {
  			return nil, err
  		}
  	}
  	return rw, nil
  }
docs: // NewLogFile creates a new LogFile. The file is optional - it will be created if needed.