Initialize Array in Golang
Application Create new folder named src. In src folder, create new file named main.go as below: package main import “fmt” func main() { var a = [5]int{2, 4, 6, 8, …
Initialize Array in Golang Read MoreLearn Programming with Real Apps
Learn Programming with Real Apps
Application Create new folder named src. In src folder, create new file named main.go as below: package main import “fmt” func main() { var a = [5]int{2, 4, 6, 8, …
Initialize Array in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import “fmt” func main() { var a [5]int a[0] = 5 a[1] …
Declare Arrays in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import ( “fmt” “strings” ) func main() { s := “p01,name 1,4.5,20” …
Split String in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import ( “fmt” “strings” ) func main() { name1 := “mary” name2 …
Compare Strings in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import ( “fmt” “strings” ) func main() { s1 := “computer” s2 …
HasPrefix and Contains in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import ( “fmt” “strings” ) func main() { s1 := “abc” s1 …
Convert String to Lowercase and Uppercase in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import ( “fmt” ) func main() { s := “abcDEF123” fmt.Println(“Length: “, …
Read Characters of String in Golang Read MoreCreate Custom Packages Create new folder named mypackages. In this folder, create new packages as below: Package 1 In mypackages folder, create new folder named package1. In this folder, create …
Create Custom Package in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import “fmt” func main() { result1 := Hi(“PMK Lab”) fmt.Println(“result 1: “, …
Functions with Return Values in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import “fmt” func main() { Hello() Sum(1, 2) Sub(10, 5) } func …
Declare Functions in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import “fmt” func main() { fmt.Println(“Demo 1”) Demo1() fmt.Println(“\nDemo 2”) Demo2() fmt.Println(“\nDemo …
Do-While Loop in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import “fmt” func main() { fmt.Println(“Demo 1”) Demo1() fmt.Println(“\nDemo 2”) Demo2() fmt.Println(“\nDemo …
While Loop in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import “fmt” func main() { fmt.Println(“Demo 1”) Demo1() fmt.Println(“\nDemo 2”) Demo2() fmt.Println(“\nDemo …
For Loop in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import “fmt” func main() { fmt.Println(“Demo 1”) Demo1() fmt.Println(“Demo 2”) Demo2() fmt.Println(“Demo …
Switch Statement in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import “fmt” func main() { var finger int = 3 if finger …
If ElseIf Statement in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import “fmt” func main() { var a int = 5 if a …
If Else Statement in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import “fmt” func main() { var a int = 5 if a …
If Statement in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import “fmt” func main() { var age int = 20 var fullName …
String Formatting in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import “fmt” func main() { var firstName string = “John” var middleName …
Concatenation in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import ( “fmt” “strconv” ) func main() { var result1 bool var …
Type Conversions in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import ( “fmt” ) func main() { a := 123 fmt.Println(“a:”, a) …
Short Variable Declarations in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import ( “fmt” ) func main() { fmt.Println(“Demo 1”) Demo1() fmt.Println(“Demo 2”) …
Declare Variables with Initializers in Golang Read MoreApplication Create new folder named src. In src folder, create new file named main.go as below: package main import ( “fmt” ) func main() { var age int var fullName …
Declare Variables in Golang Read MoreInstall Libraries Make sure Git is installed on your machine and in your system’s PATH. Install the package to your $GOPATH with the go tool from shell: $ go get …
Delete Entity in GoLang and MySQL Database Read MoreInstall Libraries Make sure Git is installed on your machine and in your system’s PATH. Install the package to your $GOPATH with the go tool from shell: $ go get …
Update Entity in GoLang and MySQL Database Read MoreInstall Libraries Make sure Git is installed on your machine and in your system’s PATH. Install the package to your $GOPATH with the go tool from shell: $ go get …
Create Entity in GoLang and MySQL Database Read MoreInstall Libraries Make sure Git is installed on your machine and in your system’s PATH. Install the package to your $GOPATH with the go tool from shell: $ go get …
Call Stored Procedure with Parameters in GoLang and MySQL Database Read MoreInstall Libraries Make sure Git is installed on your machine and in your system’s PATH. Install the package to your $GOPATH with the go tool from shell: $ go get …
Call Stored Procedure with No Parameters in GoLang and MySQL Database Read MoreInstall Libraries Make sure Git is installed on your machine and in your system’s PATH. Install the package to your $GOPATH with the go tool from shell: $ go get …
Avg in GoLang and MySQL Database Read MoreInstall Libraries Make sure Git is installed on your machine and in your system’s PATH. Install the package to your $GOPATH with the go tool from shell: $ go get …
Min and Max in GoLang and MySQL Database Read More