All Go Rust Python PHP JavaScript
Chrome Dev Summit to secure your spot in workshops, office hours and learning lounges!

How to Remove the First Character of a String in Go

In Golang, using the DecodeRuneInString function is the easiest way to remove the first character of a string. Using DecodeRuneInString Function The following example should cover whatever you are trying to do: package main import ( "fmt" ...
Patcher56

How to Trim Leading and Trailing White Spaces of a String in Go

In Golang, there are 3 ways to trim leading and trailing white spaces of a string. Using strings.TrimSpace Function The easiest way to trim leading and trailing white spaces of a string in Golang. For example, package main import ( "fmt" "...
Tomoki

How to Read a File Line-by-Line in Go

In Golang, there are 2 ways to read a file line-by-line. Using bufio.Scanner Function Scanner provides a convenient interface for reading data such as a file of newline-delimited lines of text. The ones that are currently implemented are: packa...
Sambhav Khandelwal

How to use the go build command line

compile packages and dependencies. Build compiles the packages named by the import paths, along with their dependencies, but it does not install the results. Build go build go build hello.go ls -lh 1.9M Jun 29 17:38 hello ...

How to install Lodash

Lodash is a JavaScript library which provides utility functions for common programming tasks using the functional programming paradigm.--pname-- is a JavaScript library that helps programmers write more concise and maintainable JavaScript. Installa...