Welcome To Golang By Example

Menu
  • Home
  • Blog
  • Contact Us
  • Support this website
Menu

Tag: go

Rename file or folder in Go (Golang)

Posted on April 15, 2020April 16, 2020 by admin

Overview os.Rename() function can be used to rename a file or folder. Below is the signature of the function. old and new can be fully qualified as well. If the old and…

Execute an OS/System Command in Go (Golang)

Posted on April 13, 2020April 13, 2020 by admin

Overview os/exec package can be used to trigger any OS or system command from Go. It has two functions which can be used to achieve the same Command – Used to create…

Return exit status code in Go (Golang)

Posted on April 13, 2020April 13, 2020 by admin

Overview ‘os’ package of golang provides an Exit function that can be used to exit the current program with a status code. Status code zero means success Non-zero status code means an…

Get Hostname in Go (Golang)

Posted on April 13, 2020January 5, 2021 by admin

Overview ‘os’ package of golang provides a Hostname function that can be used to get the hostname that is reported by the kernelBelow is the signature of this method. It returns an…

Function in Go (Golang)

Posted on April 8, 2020January 5, 2021 by admin

This is the  chapter 8 of the golang comprehensive tutorial series. Refer to this link for other chapters of the series – Golang Comprehensive Tutorial Series Next Tutorial – ConstantsPrevious Tutorial –All basic data types Now…

Generate a random string in Go (Golang)

Posted on April 8, 2020April 8, 2020 by admin

Overview ‘mat/rand’ package of golang contains a Intn function that can be used to generate a pseudo-random number between [0,n). Bracket at the end means that n is exclusive. This function can…

Generate a number in a given range in Go (Golang)

Posted on April 8, 2020April 8, 2020 by admin

Overview ‘mat/rand’ package of golang contains a Intn function that can be used to generate a random number between [0,n). Bracket at the end means that n is exclusive. To know more…

Generate a random array/slice of n integers in Go (Golang)

Posted on April 2, 2020April 2, 2020 by admin

Overview math/rand package of GO provides a Perm method that can be used generate the pseudo-random slice of n integers. The array will be pseudo-random permutation of the integers in the range…

Generate a random character in Go (Golang)

Posted on April 2, 2020April 2, 2020 by admin

Overview ‘mat/rand’ package of golang contains an Intn function that can be used to generate a random number between [0,n). The bracket at the end means that n is exclusive. To know…

Shuffle a slice or array in Go (Golang)

Posted on April 2, 2020April 2, 2020 by admin

Overview math/rand package of go provides a Shuffle method that can be used shuffle an array or a slice. This method pseudo-randomizes the order of elements using the default source. pseudo-randomizes means…

Posts pagination

Previous 1 … 36 37 38 … 44 Next
Follow @golangbyexample

Popular Articles

Golang Comprehensive Tutorial Series

All Design Patterns in Go (Golang)

Slice in golang

Variables in Go (Golang) – Complete Guide

OOP: Inheritance in GOLANG complete guide

Using Context Package in GO (Golang) – Complete Guide

All data types in Golang with examples

Understanding time and date in Go (Golang) – Complete Guide

©2025 Welcome To Golang By Example | Design: Newspaperly WordPress Theme