Welcome To Golang By Example

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

Category: Tech

Time/Date Formatting in Go

Posted on January 25, 2020January 25, 2020 by admin

If you have worked with time/date formatting in other languages you might have noticed that the other languages use special placeholders for time/date formatting. For eg ruby language uses %d for day…

Current Timestamp in Go (Golang)

Posted on January 24, 2020January 25, 2020 by admin

Overview In this tutorial, we will see how to get the current timestamp using the time package in Go. The current time can be represented in different ways time.Time object Unix Time…

Get age given a DOB in Go (Golang)

Posted on January 23, 2020January 24, 2020 by admin

This tutorial will talk about how given a date of birth we can compute the age of a person. go-age comes to our rescue for doing that. It also takes into account…

Understanding Rune in Golang

Posted on January 23, 2020January 23, 2020 by admin

Overview rune in Go is an alias for int32 meaning it is an integer value. This integer value is meant to represent a Unicode Code Point. To understand rune you have to know…

Understanding uintptr in Golang

Posted on January 22, 2020January 22, 2020 by admin

Overview This is an unsigned integer type which is large enough to hold any pointer address. Therefore its size is platform dependent. It is just an integer representation of an address. Properties…

Represent Date of Birth in Go (Golang)

Posted on January 22, 2020January 22, 2020 by admin

time.Date function of time package can be used to create a particular date that can represent a DOB. See below example getDOB is the function that takes in a year, month and…

Append to an existing file in Go (Golang)

Posted on January 17, 2020January 17, 2020 by admin

os.OpenFile() function of the os package can be used to open to a file in an append mode and then write to it Let’s see an example. In the below program: First,…

Touch a file in Go (Golang)

Posted on January 16, 2020February 23, 2020 by admin

Touching a file means Create an empty file if the file doesn’t already exist If the file already exists then update the modified time of the file. Output: When running the first…

Get Current Working Directory in Go (Golang)

Posted on January 16, 2020January 16, 2020 by admin

os.Getwd() is used to get the current working directory. Output will similar to pwd command on linux Output: Current Working Direcoty: <will be current working directory on the machine>

Iterate over all files and folders for a path in Go (Golang)

Posted on January 16, 2020April 22, 2021 by admin

‘Walk’ function of ‘filepath’ package can be used to recursively iterate over all files/folder in a directory tree. ‘Walk’ function will walk the entire tree rooted at the root path include all…

Posts pagination

Previous 1 … 53 54 55 … 62 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