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
  7664f8d7_a686_754e_e0aa_b13b241d5631["setFloatField()"]
  6153aa3f_ed0b_2237_43a1_5d4f68982dd7["setWithProperType()"]
  6153aa3f_ed0b_2237_43a1_5d4f68982dd7 -->|calls| 7664f8d7_a686_754e_e0aa_b13b241d5631
  style 7664f8d7_a686_754e_e0aa_b13b241d5631 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
}

Domain

Subdomains

Frequently Asked Questions

What does setFloatField() do?
setFloatField() is a function in the gin codebase.
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