Go語言反射實現Http Url與Method映射

      最近使用Go語言,使用http server,作了一個簡單Url到StructName/MethodName的簡單映射。主要思路是將Url可以StructName/MethodName作個映射,只需在Struct中添加方法就能夠添加了實現,好比localhost:9000\struct\a和localhost:9000\struct\b,如果struct須要添加能夠定義新的Struct
相關文章
相關標籤/搜索