Go Break Statement A break statement is used to break out of the innermost structure in which it occurs. It can be…
for
-
-
Go Goto Statement The Go goto statement is a jump statement which is used to transfer the control to other parts of…
-
Go Reflect Go Reflection is the ability of a program to examine its own structure, particularly through the types; it’s a form…
-
Go Channel The channel acts as a pipe by which we send typed values from one Goroutine to another. It guarantees synchronization…
-
Go Hello World Example package main import “fmt” func main() { fmt.Println(“Hello, World”) } Output: Hello, World The First line is the…
-
Go Regex Go Regex package is used for searching string. To search a string, we need to provide a pattern of the…
-
Go Closure Here, we create an anonymous function which acts as a function closure. A function which has no name is called…
-
Go HTTP Server Go can be also used to create web applications. Net/http is a library package used to build web applications.…
-
Go REST API Example package main import ( “encoding/json” “log” “net/http” “github.com/gorilla/mux” ) type Employee struct { ID string ‘json:”id,omitempty”‘ Firstname string…
-
Go Command Line Arguments When we need to execute a program with some arguments, we generally use command line argument. The arguments…