Skip to content

Instantly share code, notes, and snippets.

@kaiwren
Created October 22, 2017 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kaiwren/462a6a1fc6cdfca5dc6119ec1057146f to your computer and use it in GitHub Desktop.
Save kaiwren/462a6a1fc6cdfca5dc6119ec1057146f to your computer and use it in GitHub Desktop.
type Operation struct {
timeValue time.Time
s2IDLevel int64
s2ID int64
// ...
// ...
}
func (op operation) Perform() error {
surgeRepository := repository.NewSurgeRepository()
// ...
// ...(do some calculation)
// ...
err = surgeRepository.Insert(surge)
// ...
return err
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment