[16] Results

Golang : Get path name to current directory or folder

golang current-directory

Problem :

You need to get the path name of the current directory where the executable is residing. How to….... read more


Golang : Get current time

golang get-current-time

Problem : Need to get current time stamp in Go and display in string. Solution : Use the time.Local() and time.Format() functions. getcurrenttime.go package main….... read more


Golang : Get current URL example

golang current-url hostname net-http

One of the common tasks that a web application developer will encounter is on how to get the currently viewed….... read more


Golang : Check to see if *File is a file or directory

golang file directory

Sometimes, we need to write codes that is robust and flexible enough to handle different situation. For example, if a….... read more


Golang : Delete certain files in a directory

golang delete directory

Encounter a situation today where I need to delete some files in a directory. Not all files, but some files….... read more


Golang : Check if a directory exist or not

golang directory

In this short tutorial, we will learn how to check if a parameter passed as argument is directory or not. It is pretty straight forward….... read more


Delete a directory in Go

golang delete-directory

A simple tutorial on how to delete a directory in Go. This tutorial is a respond to this solution which is not the recommended way.….... read more


Golang *File points to a file or directory ?

golang file directory

In this tutorial, we will learn how to find out if the *File pointer is pointing to a file or directory. The codes are self….... read more


Advertisement