diff --git a/codegen/protocol/packets.tmpl b/codegen/protocol/packets.tmpl
index 38817f454742e1f0a0f956386e440ba95caea6af..83537d321e43495bc2ae07e82563a83498f238e1 100644
--- a/codegen/protocol/packets.tmpl
+++ b/codegen/protocol/packets.tmpl
@@ -7,6 +7,9 @@ import (
 
 // codegen: modify for debug only
 
+var _ bytes.Buffer
+var _ io.Reader
+
 {{define "fieldType" -}}
     {{$parent := (index . 0) -}}
     {{$field := (index . 1) -}}
diff --git a/lib/gat/protocol/backend.go b/lib/gat/protocol/backend.go
index 92ab8dd0675406f496b808ea3fc91612c8a277fb..618b93b1c22e8fe5dbf2a8bc6fcf5de62013cf91 100644
--- a/lib/gat/protocol/backend.go
+++ b/lib/gat/protocol/backend.go
@@ -7,6 +7,9 @@ import (
 
 // codegen: modify for debug only
 
+var _ bytes.Buffer
+var _ io.Reader
+
 type FieldsAuthentication struct {
 	Data []byte
 }
diff --git a/lib/gat/protocol/frontend.go b/lib/gat/protocol/frontend.go
index 0fa8148abd92ba5ca1f12dada81d1a50c14ee5d5..dad1d9c0bcb0ccc6e43cce27a8467a0d65028e7b 100644
--- a/lib/gat/protocol/frontend.go
+++ b/lib/gat/protocol/frontend.go
@@ -7,6 +7,9 @@ import (
 
 // codegen: modify for debug only
 
+var _ bytes.Buffer
+var _ io.Reader
+
 type FieldsBindParameterValues struct {
 	Value []byte
 }
diff --git a/lib/gat/protocol/shared.go b/lib/gat/protocol/shared.go
index 0ebf9dd420ceec40ffc6def470b3d625bdd5229a..1062db83ca0efdc82e14efc3331b886a0aefae6a 100644
--- a/lib/gat/protocol/shared.go
+++ b/lib/gat/protocol/shared.go
@@ -7,6 +7,9 @@ import (
 
 // codegen: modify for debug only
 
+var _ bytes.Buffer
+var _ io.Reader
+
 type FieldsCopyData struct {
 	Data []byte
 }