Created
June 12, 2019 03:25
-
-
Save ridhoperdana/f5291fb73898833a24f5a24e53f1e6cb to your computer and use it in GitHub Desktop.
main file to run operator.go with add function 10 value
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 main | |
| import ( | |
| "context" | |
| "fmt" | |
| "github.com/ridhoperdana/calculator" | |
| ) | |
| func main() { | |
| o := calculator.InitOperation() | |
| result, err := o.Add(context.Background(), 10) | |
| if err != nil { | |
| panic(err) | |
| } | |
| fmt.Println("result is: ", result) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment