code: func argTypeHelp(xT descLookupFunc, structField reflect.StructField, defaultVal *reflect.Value) string {
  	// Indirect the pointer if needed and track if it's an optional field.
  	fieldType := structField.Type
  	var isOptional bool
  	if fieldType.Kind() == reflect.Ptr {
  		fieldType = fieldType.Elem()
  		isOptional = true
  	}
  
  	// When there is a default value, it must also be a pointer due to the
  	// rules enforced by RegisterCmd.
  	if defaultVal != nil {
  		indirect := defaultVal.Elem()
  		defaultVal = &indirect
  	}
  
  	// Convert the field type to a JSON type.
  	details := make([]string, 0, 3)
  	details = append(details, reflectTypeToJSONType(xT, fieldType))
  
  	// Add optional and default value to the details if needed.
  	if isOptional {
  		details = append(details, xT("help-optional"))
  
  		// Add the default value if there is one.  This is only checked
  		// when the field is optional since a non-optional field can't
  		// have a default value.
  		if defaultVal != nil {
  			val := defaultVal.Interface()
  			if defaultVal.Kind() == reflect.String {
  				val = fmt.Sprintf(`"%s"`, val)
  			}
  			str := fmt.Sprintf("%s=%v", xT("help-default"), val)
  			details = append(details, str)
  		}
  	} else {
  		details = append(details, xT("help-required"))
  	}
  
  	return strings.Join(details, ", ")
  }
docs: // argTypeHelp returns the type of provided command argument as a string in the
  // format used by the help output.  In particular, it includes the JSON type
  // (boolean, numeric, string, array, object) along with optional and the default
  // value if applicable.