code: func ReadAtMost(path string, max int64) ([]byte, bool, error) {
  	f, err := os.Open(path)
  	if err != nil {
  		return nil, false, err
  	}
  	defer f.Close()
  	fi, err := f.Stat()
  	if err != nil {
  		return nil, false, err
  	}
  	size := fi.Size()
  	if size == 0 {
  		return nil, false, nil
  	}
  	if size < max {
  		max = size
  	}
  	offset, err := f.Seek(-max, io.SeekEnd)
  	if err != nil {
  		return nil, false, err
  	}
  	data, err := ioutil.ReadAll(f)
  	return data, offset > 0, err
  }
docs: // ReadAtMost reads at most max bytes from the end of the file identified by path or
  // returns an error. It returns true if the file was longer than max. It will
  // allocate up to max bytes.