feat: add swag tool

This commit is contained in:
Rogee
2024-12-25 16:18:41 +08:00
parent 2f2feb35c2
commit 77e36d5aaf
16 changed files with 76 additions and 54 deletions

View File

@@ -1,8 +1,9 @@
package swag
import (
"github.com/stretchr/testify/assert"
"testing"
"github.com/stretchr/testify/assert"
)
func TestFieldsByAnySpace(t *testing.T) {
@@ -15,14 +16,16 @@ func TestFieldsByAnySpace(t *testing.T) {
args args
want []string
}{
{"test1",
{
"test1",
args{
" aa bb cc dd ff",
2,
},
[]string{"aa", "bb\tcc dd \t\tff"},
},
{"test2",
{
"test2",
args{
` aa "bb cc dd ff"`,
2,