package responsibility_chain import ( "fmt" "testing" ) func TestHandle_Handle(t *testing.T) { one := NewHandle("张三", nil, 1) two := NewHandle("李四", one, 2) fmt.Println(one.Handle(1)) fmt.Println(two.Handle(2)) }