Skip to content

Instantly share code, notes, and snippets.

@ridhoperdana
Created June 12, 2019 03:25
Show Gist options
  • Select an option

  • Save ridhoperdana/f5291fb73898833a24f5a24e53f1e6cb to your computer and use it in GitHub Desktop.

Select an option

Save ridhoperdana/f5291fb73898833a24f5a24e53f1e6cb to your computer and use it in GitHub Desktop.
main file to run operator.go with add function 10 value
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