Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type ControllerInterface {
- ControlStuff(state int) (action int)
- }
- type Controller1 struct {
- someData string
- }
- func (c *Controller1) ControlStuff(state int) (action int) {
- if c.someData = "5" {
- return 0
- }
- return 1
- }
- func (c *Controller1) Load(d string) {
- c.someData = d
- }
- type Controller2 struct {
- someData int
- }
- func (c *Controller2) ControlStuff(state int) (action int) {
- if c.someData = 5 {
- return 0
- }
- return 1
- }
- func (c *Controller2) Load(d int) {
- c.someData = d
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement