Skip to content
Myr

toml_test.go

This file

Path

binding/toml_test.go

22 lines · 503 bytes · Go

Last changed by

Not known.

History of this file

Take it

The walk stopped after 200 commits: lines older than cf32d2d point at it.

chore(deps): bump github.com/pelletier/go-toml/v2 from 2.2.2 to 2.2.4 (#4212)dependabot[bot]before adoptioncf32d2d

lines 1–22why, one step back
1// Copyright 2022 Gin Core Team. All rights reserved.
2// Use of this source code is governed by a MIT style3// license that can be found in the LICENSE file.45package binding67import (8 "testing"910 "github.com/stretchr/testify/assert"11 "github.com/stretchr/testify/require"12)1314func TestTOMLBindingBindBody(t *testing.T) {15 var s struct {16 Foo string `toml:"foo"`17 }18 tomlBody := `foo="FOO"`19 err := tomlBinding{}.BindBody([]byte(tomlBody), &s)20 require.NoError(t, err)21 assert.Equal(t, "FOO", s.Foo)22}