Last active
August 8, 2019 21:48
-
-
Save omissis/7b18063ed25347bb1f1d85d413dd0d6d to your computer and use it in GitHub Desktop.
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 shorturl | |
| func NewResolveService(r RecordRepository) *ResolveService { | |
| return &ResolveService{ | |
| repository: r, | |
| } | |
| } | |
| type ResolveService struct { | |
| repository RecordRepository | |
| } | |
| func (csu *ResolveService) Execute(c string) (*Record, error) { | |
| return csu.repository.FindOneByCode(Code(c)) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment