code: func IsDeviceNode(path string) bool {
  	d, err := os.Lstat(path)
  	if err == nil {
  		m := d.Mode()
  		return m&os.ModeDevice == os.ModeDevice
  	}
  	return false
  }
docs: // IsDeviceNode checks if the given path points to a block or char device.
  // It doesn't follow symlinks.