Question Answer Question Method declaration syntax Answer Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus … [Read more...] about Golang interview questions
Go Modules
© cloudinaryAccording to golang official github,Modules are an experimental opt-in feature in Go 1.11, with the plan of incorporating feedback and finalizing the feature for Go 1.13.The initial prototype (vgo) was announced in February 2018. In July 2018, support for versioned modules … [Read more...] about Go Modules
Read File: Go lang
© clipartmax.comIn this blog post, I will show you how to read a file in golang using bufio. Create a file with name test.txt and add the below contents,ken thompson alan donovan brian kernighanFile Read Examplepackage mainimport ( "fmt" "os" "bufio" "strings" )func check(e … [Read more...] about Read File: Go lang
Composite types: Structs
©techort.comStructsStruct is a collection of fields.Syntaxtype User struct { username string email string phone string }var u1 UserInitializing StructsStruct can be initialized using new keyword which will initialize fields with 0or in below manner, … [Read more...] about Composite types: Structs
Composite types: Slice
SlicesA Slice is like a dynamically-sized array. A slice type is written []T,where elements has type T. So it's like an array without size defined.A Slice is a light weight data structure that gives access to sequence of elements of an array, also known as slice's underlying … [Read more...] about Composite types: Slice
Scan string/int in golang
Let's see how to scan string and int in golang. You need to import the following packages for operating on strings.Scan a stringpackage mainimport ( "bufio" "errors" "fmt" "os" "strings" )func main() { fmt.Println("Please enter a String") … [Read more...] about Scan string/int in golang
installing goland on ubuntu or kali linux
Introduction GoLand is a new commercial IDE by JetBrains aimed at providing an ergonomic environment for Go development.The new IDE extends the IntelliJ platform with coding assistance and tool integrations specific for the Go language. To know more about it visit official website here. In the … [Read more...] about installing goland on ubuntu or kali linux
How to install golang on ubuntu or kali linux
IntroductionGo is a modern programming language developed by Google that uses high-level syntax similar to scripting languages. Go is a statically typed, compiled language in the tradition of C. This tutorial, I will walk you through downloading and installing Go on … [Read more...] about How to install golang on ubuntu or kali linux