企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
~~~ package bridge import ( "fmt" "testing" ) func TestBridge(t *testing.T) { sa := SoftwareA{Software{"a"}} sb := SoftwareB{Software{"b"}} pa := NewPhoneA("pa") pb := NewPhoneB("pb") pa.setSoft(&sa) pa.Run() pb.setSoft(&sb) pb.Run() fmt.Println() p := TSoftware{&sb} p.Run() } ~~~