[58] Results

Golang : get the current working directory of a running program

golang executable file-path

Problem :

You are looking for way to get the folder/directory of the running program.

Solution :

Use https://bitbucket.org/kardianos/osext.... read more

Golang : Get current file path of a file or executable

golang file-path

Getting a file path in Golang is not that straight forward with just a single function call. In this tutorial, we will learn how to….... read more

Golang : Get absolute path to binary for os.Exec function with exec.LookPath

golang lookpath absolute-path exec

Sometimes it is good to tell our Golang program to execute exactly which binary file based on the path. For….... read more

Golang : "https://" not allowed in import path

golang https-not-allowed import-path

Problem :

Attempt to go get packages return this error message

"https://" not allowed in import path

Solution :

.... read more

Golang : Get file last modified date and time

golang file

In this tutorial, we will learn how to get a file last modified date and time with Go. Getting the last modified date and time….... 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 : Simple File Server

golang file-server

Got a request from a developer friend yesterday on how to open up part of his machine and turn into a file server. The code….... read more

Golang : How to remove certain lines from a file

golang remove-by-line file data-processing read-text-file

Alright, here is a simple tutorial on how to remove certain lines of data from a file. There are times….... read more