app/rust/go/rs_impl.go

15 lines
198 B
Go
Raw Normal View History

2024-11-29 17:23:38 +08:00
package main
type RustCallGo struct{}
func (r RustCallGo) ping(ping string) string {
if ping == "PING" {
return "PONG"
}
panic("invalid ping")
}
func init() {
RsCallGoImpl = RustCallGo{}
}