Home / Function/ sanitizePathChars() — gin Function Reference

sanitizePathChars() — gin Function Reference

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

Function go GinCore Routing called by 1

Entity Profile

Dependency Diagram

graph TD
  4ec0e1c4_bc0f_cee8_a5ed_7d87e5054481["sanitizePathChars()"]
  22068897_9e6c_d28e_6b96_439ffa67fe6e["gin.go"]
  4ec0e1c4_bc0f_cee8_a5ed_7d87e5054481 -->|defined in| 22068897_9e6c_d28e_6b96_439ffa67fe6e
  e270acef_6155_8e19_218e_adc59e23a531["redirectTrailingSlash()"]
  e270acef_6155_8e19_218e_adc59e23a531 -->|calls| 4ec0e1c4_bc0f_cee8_a5ed_7d87e5054481
  style 4ec0e1c4_bc0f_cee8_a5ed_7d87e5054481 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

gin.go lines 799–806

func sanitizePathChars(s string) string {
	return strings.Map(func(r rune) rune {
		if (r >= 'a' && r <= 'z') || (r >= 'A' && r <= 'Z') || (r >= '0' && r <= '9') || r == '/' || r == '-' {
			return r
		}
		return -1
	}, s)
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does sanitizePathChars() do?
sanitizePathChars() is a function in the gin codebase, defined in gin.go.
Where is sanitizePathChars() defined?
sanitizePathChars() is defined in gin.go at line 799.
What calls sanitizePathChars()?
sanitizePathChars() is called by 1 function(s): redirectTrailingSlash.

Analyze Your Own Codebase

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

Try Supermodel Free