Skip to content

Instantly share code, notes, and snippets.

Created June 21, 2022 15:45
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save rahul-yr/eaf3e7ac78f72849b3d234affabfb573 to your computer and use it in GitHub Desktop.
Addition program in go
package main
import (
// addTwoNumbers adds two numbers together and prints the result
func addTwoNumbers(a int, b int) {
// sleep for a second to simulate a long running operation
time.Sleep(2 * time.Second)
log.Println("Result:", a+b)
// main is the entry point for the program
func main() {
// call addTwoNumbers with two numbers
addTwoNumbers(1, 2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment