Home / Function/ setFloatField() — gin Function Reference

setFloatField() — gin Function Reference

Architecture documentation for the setFloatField() function in form_mapping.go from the gin codebase.

Entity Profile

Dependency Diagram

graph TD
  0ea44f2c_e732_7d4f_ea03_c5c72e30870f["setFloatField()"]
  0bcba57f_f00e_ed0e_0516_ee30758711c8["form_mapping.go"]
  0ea44f2c_e732_7d4f_ea03_c5c72e30870f -->|defined in| 0bcba57f_f00e_ed0e_0516_ee30758711c8
  258ae74c_d8fe_39e5_de46_9ff457fed54a["setWithProperType()"]
  258ae74c_d8fe_39e5_de46_9ff457fed54a -->|calls| 0ea44f2c_e732_7d4f_ea03_c5c72e30870f
  style 0ea44f2c_e732_7d4f_ea03_c5c72e30870f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

binding/form_mapping.go lines 423–432

func setFloatField(val string, bitSize int, field reflect.Value) error {
	if val == "" {
		val = "0.0"
	}
	floatVal, err := strconv.ParseFloat(val, bitSize)
	if err == nil {
		field.SetFloat(floatVal)
	}
	return err
}

Subdomains

Frequently Asked Questions

What does setFloatField() do?
setFloatField() is a function in the gin codebase, defined in binding/form_mapping.go.
Where is setFloatField() defined?
setFloatField() is defined in binding/form_mapping.go at line 423.
What calls setFloatField()?
setFloatField() is called by 1 function(s): setWithProperType.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free