[60] 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 : 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 : Move file to another directory

golang move-file

So far, Go does not have a function to directly move file to different folders. We have to provide our own method to do that.….... read more


Golang : Read file with ioutil

golang read-file

This tutorial will show you how to read a file into buffer and display the content in Go. This example read plain text file, if….... 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


Golang : Process non-XML/JSON formatted ASCII text file example

golang raw-data-file non-XML non-JSON save-file

Problem:

You have to process raw data files produced by third-party servers that you have no control over. The files….... read more


Golang : Download file example

golang download file

Continuing from previous tutorial on how to use http.Get() function, in this tutorial, we will learn how to….... read more


Advertisement