8000 chore: delete useless fields in Base(protocol/thrift/base) by YangruiEmma · Pull Request #12 · cloudwego/gopkg · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore: delete useless fields in Base(protocol/thrift/base) #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 4 additions & 77 deletions protocol/thrift/base/base.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions protocol/thrift/base/base.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#! /bin/bash

# please install fastcodec version of thriftgo
# if the `feat-fastcodec` branch doesn't exist try to use `main` branch
# the feature is only for internal use now, but it will be released in the future when it's stable.
# go install github.com/cloudwego/thriftgo@feat-fastcodec

set -e

thriftgo -g fastgo:no_default_serdes=true,gen_setter=true -o=.. ./base.thrift
Expand Down
7 changes: 0 additions & 7 deletions protocol/thrift/base/base.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,10 @@ namespace py base
namespace go base
namespace java com.bytedance.thrift.base

struct TrafficEnv {
1: bool Open = false,
2: string Env = "",
}

struct Base {
1: string LogID = "",
2: string Caller = "",
3: string Addr = "",
4: string Client = "",
5: optional TrafficEnv TrafficEnv,
6: optional map<string, string> Extra,
}

Expand Down
4 changes: 0 additions & 4 deletions protocol/thrift/base/base_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func TestBase(t *testing.T) {
p.LogID = "1"
p.Caller = "2"
p.Addr = "3"
p.Client = "4"
t.Log(p.String())

sz := p.BLength()
Expand All @@ -45,9 +44,6 @@ func TestBase(t *testing.T) {
require.Equal(t, p, p2)

// optional fields

p.TrafficEnv = NewTrafficEnv()
p.TrafficEnv.InitDefault() // for code coverage ...
p.Extra = map[string]string{"5": "6"}
t.Log(p.String())

Expand Down
124 changes: 0 additions & 124 deletions protocol/thrift/base/k-base.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
0