责任链模式
摘要:为请求创建一个对象链,每个对象依次处理请求并传给链中的下一个对象。责任链中每个对象都拥有同一个父类(或接口)。 package main import ( "fmt" "strings" ) type Handler interface { Handle(content string) next(h
阅读全文
posted @ 2023-09-17 10:32
posted @ 2023-09-17 10:32
posted @ 2023-09-16 22:34
posted @ 2023-09-16 20:45
posted @ 2023-09-16 20:24
posted @ 2023-08-20 14:41