Home / Function/ WriteString() — gin Function Reference

WriteString() — gin Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  8afa6164_69df_613d_24b3_159f42216957["WriteString()"]
  0d7062ba_5ddd_c2ed_4240_42b2dab1e9c2["text.go"]
  8afa6164_69df_613d_24b3_159f42216957 -->|defined in| 0d7062ba_5ddd_c2ed_4240_42b2dab1e9c2
  style 8afa6164_69df_613d_24b3_159f42216957 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

render/text.go lines 33–41

func WriteString(w http.ResponseWriter, format string, data []any) (err error) {
	writeContentType(w, plainContentType)
	if len(data) > 0 {
		_, err = fmt.Fprintf(w, format, data...)
		return
	}
	_, err = w.Write(bytesconv.StringToBytes(format))
	return
}

Subdomains

Defined In

Frequently Asked Questions

What does WriteString() do?
WriteString() is a function in the gin codebase, defined in render/text.go.
Where is WriteString() defined?
WriteString() is defined in render/text.go at line 33.

Analyze Your Own Codebase

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

Try Supermodel Free