Skip to content

Instantly share code, notes, and snippets.

@dickyaryag6
Created October 23, 2021 12:15
Show Gist options
  • Select an option

  • Save dickyaryag6/e4e49de80f3996be0407c8a5b7a8fd5a to your computer and use it in GitHub Desktop.

Select an option

Save dickyaryag6/e4e49de80f3996be0407c8a5b7a8fd5a to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
uc "gomocking/usecase"
db "gomocking/database"
)
func main() {
databaseInstance := db.New(db.Database{})
usecaseInstance := uc.New(uc.Usecase{
Database: databaseInstance,
})
result, err := usecaseInstance.Addition("60", "20")
if err != nil {
fmt.Println(err)
} else {
fmt.Println(result)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment