deprecated_test.go — gin Source File
Architecture documentation for deprecated_test.go, a go file in the gin codebase. 1 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 6a7cf8fd_4dff_4365_0057_26bc1341b4de["deprecated_test.go"] fefe783b_8987_7aed_66c9_b2860bfc32e7["bytes"] 6a7cf8fd_4dff_4365_0057_26bc1341b4de --> fefe783b_8987_7aed_66c9_b2860bfc32e7 style 6a7cf8fd_4dff_4365_0057_26bc1341b4de fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
// Copyright 2014 Manu Martinez-Almeida. All rights reserved.
// Use of this source code is governed by a MIT style
// license that can be found in the LICENSE file.
package gin
import (
"bytes"
"net/http"
"net/http/httptest"
"testing"
"github.com/gin-gonic/gin/binding"
"github.com/stretchr/testify/assert"
)
func TestBindWith(t *testing.T) {
w := httptest.NewRecorder()
c, _ := CreateTestContext(w)
c.Request, _ = http.NewRequest(http.MethodPost, "/?foo=bar&bar=foo", bytes.NewBufferString("foo=unused"))
var obj struct {
Foo string `form:"foo"`
Bar string `form:"bar"`
}
captureOutput(t, func() {
assert.NoError(t, c.BindWith(&obj, binding.Form))
})
assert.Equal(t, "foo", obj.Bar)
assert.Equal(t, "bar", obj.Foo)
assert.Equal(t, 0, w.Body.Len())
}
Domain
Subdomains
Functions
Classes
Types
Dependencies
- bytes
Source
Frequently Asked Questions
What does deprecated_test.go do?
deprecated_test.go is a source file in the gin codebase, written in go. It belongs to the GinCore domain, Routing subdomain.
What functions are defined in deprecated_test.go?
deprecated_test.go defines 1 function(s): TestBindWith.
What does deprecated_test.go depend on?
deprecated_test.go imports 1 module(s): bytes.
Where is deprecated_test.go in the architecture?
deprecated_test.go is located at deprecated_test.go (domain: GinCore, subdomain: Routing).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free