code: func validDeviceMode(mode string) bool {
  	var legalDeviceMode = map[rune]bool{
  		'r': true,
  		'w': true,
  		'm': true,
  	}
  	if mode == "" {
  		return false
  	}
  	for _, c := range mode {
  		if !legalDeviceMode[c] {
  			return false
  		}
  		legalDeviceMode[c] = false
  	}
  	return true
  }
docs: // validDeviceMode checks if the mode for device is valid or not.
  // Valid mode is a composition of r (read), w (write), and m (mknod).