Created
November 11, 2020 20:01
-
-
Save Israel-Miles/2b35114428a2b8055c16fd3711fd7709 to your computer and use it in GitHub Desktop.
command-pattern
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
type increaseVolumeCommand struct { | |
device device | |
} | |
func (c *increaseVolumeCommand) execute() { | |
c.device.increaseVolume() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment