From 2532b4f72f84b05e06f7a94fac342d44919a7e50 Mon Sep 17 00:00:00 2001 From: lixizan Date: Mon, 4 Dec 2023 21:54:57 +0800 Subject: [PATCH] fix package name --- contrib/pb/codec.go | 4 ++-- contrib/yaml/codec.go | 6 +++--- contrib/yaml/codec_test.go | 7 +------ 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/contrib/pb/codec.go b/contrib/pb/codec.go index 4897bb4..6192253 100644 --- a/contrib/pb/codec.go +++ b/contrib/pb/codec.go @@ -1,5 +1,3 @@ -//go:generate go mod tidy - package pb import ( @@ -12,6 +10,8 @@ import ( "io" ) +//go:generate go mod tidy + var ( errDataType = errors.New("v must be proto.Message type") Encoder = new(encoder) diff --git a/contrib/yaml/codec.go b/contrib/yaml/codec.go index 8e71553..2608b50 100644 --- a/contrib/yaml/codec.go +++ b/contrib/yaml/codec.go @@ -1,6 +1,4 @@ -//go:generate go mod tidy - -package pb +package yaml import ( "bytes" @@ -12,6 +10,8 @@ import ( "io" ) +//go:generate go mod tidy + var Encoder = new(encoder) type encoder struct{} diff --git a/contrib/yaml/codec_test.go b/contrib/yaml/codec_test.go index 98ad0e9..6959cba 100644 --- a/contrib/yaml/codec_test.go +++ b/contrib/yaml/codec_test.go @@ -1,4 +1,4 @@ -package pb +package yaml import ( "github.com/lxzan/hasaki" @@ -18,11 +18,6 @@ func TestEncoder_Encode(t *testing.T) { Age int }{Name: "aha"} - // var text = ` - //user: - // name: "caster" - // age: 1 - //` _, err := Encoder.Encode(params) assert.NoError(t, err) })