summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-10-28 20:53:38 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2018-10-28 21:46:09 +0900
commitf8bea14d20a61c2947866a82ddd5a74af4c82c73 (patch)
tree79cf94bd2f2d3cfc35f5195c1e0570e38a0f24f9 /pkg
parent18b87c329c12b5a25daddc1ae2b197e71e3de5e2 (diff)
server: make NewGlobalFromAPIStruct() unexported
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'pkg')
-rw-r--r--pkg/server/grpc_server.go2
-rw-r--r--pkg/server/server.go2
2 files changed, 2 insertions, 2 deletions
diff --git a/pkg/server/grpc_server.go b/pkg/server/grpc_server.go
index 8b70c36e..81244bb0 100644
--- a/pkg/server/grpc_server.go
+++ b/pkg/server/grpc_server.go
@@ -1752,7 +1752,7 @@ func (s *Server) GetBgp(ctx context.Context, r *api.GetBgpRequest) (*api.GetBgpR
return s.bgpServer.GetBgp(ctx, r)
}
-func NewGlobalFromAPIStruct(a *api.Global) *config.Global {
+func newGlobalFromAPIStruct(a *api.Global) *config.Global {
families := make([]config.AfiSafi, 0, len(a.Families))
for _, f := range a.Families {
name := config.IntToAfiSafiTypeMap[int(f)]
diff --git a/pkg/server/server.go b/pkg/server/server.go
index 23391c19..0428a25b 100644
--- a/pkg/server/server.go
+++ b/pkg/server/server.go
@@ -1928,7 +1928,7 @@ func (s *BgpServer) StartBgp(ctx context.Context, r *api.StartBgpRequest) error
return fmt.Errorf("invalid router-id format: %s", g.RouterId)
}
- c := NewGlobalFromAPIStruct(g)
+ c := newGlobalFromAPIStruct(g)
if err := config.SetDefaultGlobalConfigValues(c); err != nil {
return err
}