Created
October 22, 2017 09:04
-
-
Save kaiwren/89b813d67ea7847f39af0d952a95b22b to your computer and use it in GitHub Desktop.
This file contains 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
type Operation struct { | |
timeValue time.Time | |
s2IDLevel int64 | |
s2ID int64 | |
// ... | |
// ... | |
} | |
func (op operation) Perform(surgeRepository repository.SurgeRepository) error { | |
// ... | |
// ...(do some calculation) | |
// ... | |
err = surgeRepository.Insert(surge) | |
// ... | |
return err | |
} |
This file contains 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
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