summaryrefslogtreecommitdiffhomepage
path: root/table/policy.go
diff options
context:
space:
mode:
authorWataru Ishida <ishida.wataru@lab.ntt.co.jp>2016-11-17 02:06:22 -0500
committerWataru Ishida <ishida.wataru@lab.ntt.co.jp>2016-11-17 21:52:20 -0500
commit24e397b0f65b1c5294ea711a953501fda944411d (patch)
tree6a08d7863516465fc1c421cfd20805f2c209f833 /table/policy.go
parenta3e262f3a83fedeeabc5c7820a6d42b54e0325c1 (diff)
add go vet test
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'table/policy.go')
-rw-r--r--table/policy.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/table/policy.go b/table/policy.go
index 7ac8a6c3..1d055b57 100644
--- a/table/policy.go
+++ b/table/policy.go
@@ -56,6 +56,18 @@ const (
ROUTE_TYPE_REJECT
)
+func (t RouteType) String() string {
+ switch t {
+ case ROUTE_TYPE_NONE:
+ return "continue"
+ case ROUTE_TYPE_ACCEPT:
+ return "accept"
+ case ROUTE_TYPE_REJECT:
+ return "reject"
+ }
+ return fmt.Sprintf("unknown(%d)", t)
+}
+
type PolicyDirection int
const (