Skip to content

Instantly share code, notes, and snippets.

@syafdia
Last active May 9, 2021 13:56
Show Gist options
  • Save syafdia/6f94e97900218850202e199d7cebd81b to your computer and use it in GitHub Desktop.
Save syafdia/6f94e97900218850202e199d7cebd81b to your computer and use it in GitHub Desktop.
// T is a type alias to accept any type.
type T = interface{}
// WorkerPool is a contract for Worker Pool implementation
type WorkerPool interface {
Run()
AddTask(task func())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment