Skip to content

Instantly share code, notes, and snippets.

@jcdan3
Created February 14, 2022 21:06
Show Gist options
  • Save jcdan3/2fefe6685e9b771fda2728790dc5fd92 to your computer and use it in GitHub Desktop.
Save jcdan3/2fefe6685e9b771fda2728790dc5fd92 to your computer and use it in GitHub Desktop.
package notifier
import "fmt"
type notifier struct {
name *string
id int
counter int
}
func (n *notifier) notifyOwner() {
fmt.Println("Receiving user notification from " + *n.name)
}
func (n *notifier) Notify() {
n.counter += 1
n.notifyOwner()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment