Home / File/ toml_test.go — gin Source File

toml_test.go — gin Source File

Architecture documentation for toml_test.go, a go file in the gin codebase. 1 imports, 0 dependents.

File go RequestBinding FormBinding 1 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  2b798f99_e660_7740_ea9e_4efba35f9bb9["toml_test.go"]
  0ff88466_66bc_01d5_630e_e073ff70cccb["testing"]
  2b798f99_e660_7740_ea9e_4efba35f9bb9 --> 0ff88466_66bc_01d5_630e_e073ff70cccb
  style 2b798f99_e660_7740_ea9e_4efba35f9bb9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

// Copyright 2022 Gin Core Team. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.

package binding

import (
	"testing"

	"github.com/stretchr/testify/assert"
	"github.com/stretchr/testify/require"
)

func TestTOMLBindingBindBody(t *testing.T) {
	var s struct {
		Foo string `toml:"foo"`
	}
	tomlBody := `foo="FOO"`
	err := tomlBinding{}.BindBody([]byte(tomlBody), &s)
	require.NoError(t, err)
	assert.Equal(t, "FOO", s.Foo)
}

Subdomains

Types

Dependencies

  • testing

Frequently Asked Questions

What does toml_test.go do?
toml_test.go is a source file in the gin codebase, written in go. It belongs to the RequestBinding domain, FormBinding subdomain.
What functions are defined in toml_test.go?
toml_test.go defines 1 function(s): TestTOMLBindingBindBody.
What does toml_test.go depend on?
toml_test.go imports 1 module(s): testing.
Where is toml_test.go in the architecture?
toml_test.go is located at binding/toml_test.go (domain: RequestBinding, subdomain: FormBinding, directory: binding).

Analyze Your Own Codebase

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

Try Supermodel Free