code: func fillGo18FileTypeBits(mode int64, fi os.FileInfo) int64 {
  	fm := fi.Mode()
  	switch {
  	case fm.IsRegular():
  		mode |= modeISREG
  	case fi.IsDir():
  		mode |= modeISDIR
  	case fm&os.ModeSymlink != 0:
  		mode |= modeISLNK
  	case fm&os.ModeDevice != 0:
  		if fm&os.ModeCharDevice != 0 {
  			mode |= modeISCHR
  		} else {
  			mode |= modeISBLK
  		}
  	case fm&os.ModeNamedPipe != 0:
  		mode |= modeISFIFO
  	case fm&os.ModeSocket != 0:
  		mode |= modeISSOCK
  	}
  	return mode
  }
docs: // fillGo18FileTypeBits fills type bits which have been removed on Go 1.9 archive/tar
  // https://github.com/golang/go/commit/66b5a2f