code: func fieldUsage(structField reflect.StructField, defaultVal *reflect.Value) string {
  	// When the field has a jsonrpcusage struct tag specified use that
  	// instead of automatically generating it.
  	if tag := structField.Tag.Get("jsonrpcusage"); tag != "" {
  		return tag
  	}
  
  	// Indirect the pointer if needed.
  	fieldType := structField.Type
  	if fieldType.Kind() == reflect.Ptr {
  		fieldType = fieldType.Elem()
  	}
  
  	// 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
  	}
  
  	// Handle certain types uniquely to provide nicer usage.
  	fieldName := strings.ToLower(structField.Name)
  	switch fieldType.Kind() {
  	case reflect.String:
  		if defaultVal != nil {
  			return fmt.Sprintf("%s=%q", fieldName,
  				defaultVal.Interface())
  		}
  
  		return fmt.Sprintf("%q", fieldName)
  
  	case reflect.Array, reflect.Slice:
  		return subArrayUsage(fieldType, fieldName)
  
  	case reflect.Struct:
  		return subStructUsage(fieldType)
  	}
  
  	// Simply return the field name when none of the above special cases
  	// apply.
  	if defaultVal != nil {
  		return fmt.Sprintf("%s=%v", fieldName, defaultVal.Interface())
  	}
  	return fieldName
  }
docs: // fieldUsage returns a string for use in the one-line usage for the struct
  // field of a command.
  //
  // Any fields that include a jsonrpcusage struct tag will use that instead of
  // being automatically generated.