Home / Function/ TestState_GetBool() — fiber Function Reference

TestState_GetBool() — fiber Function Reference

Architecture documentation for the TestState_GetBool() function in state_test.go from the fiber codebase.

Entity Profile

Dependency Diagram

graph TD
  7a2544a6_efb4_21d8_8781_73fb85e6023c["TestState_GetBool()"]
  040d1690_51eb_9416_23b2_7b1543e92d65["state_test.go"]
  7a2544a6_efb4_21d8_8781_73fb85e6023c -->|defined in| 040d1690_51eb_9416_23b2_7b1543e92d65
  style 7a2544a6_efb4_21d8_8781_73fb85e6023c fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

state_test.go lines 83–102

func TestState_GetBool(t *testing.T) {
	t.Parallel()
	st := newState()

	st.Set("flag", true)
	b, ok := st.GetBool("flag")
	require.True(t, ok)
	require.True(t, b)

	// wrong type
	st.Set("num", 1)
	b, ok = st.GetBool("num")
	require.False(t, ok)
	require.False(t, b)

	// missing key should return false
	b, ok = st.GetBool("missing")
	require.False(t, ok)
	require.False(t, b)
}

Domain

Subdomains

Defined In

Frequently Asked Questions

What does TestState_GetBool() do?
TestState_GetBool() is a function in the fiber codebase, defined in state_test.go.
Where is TestState_GetBool() defined?
TestState_GetBool() is defined in state_test.go at line 83.

Analyze Your Own Codebase

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

Try Supermodel Free