Passion. Creativity. Courage. Technology.

The official phogo journal

File System notifications with Golang

The [fsnotify]() is the most broadly used package for observing file changes. It supports multiple platforms and notification mechanisms: inotify (Linux) kqueue (BSD, MacOS, iOS) ReadDirectoryChangesW (Windows) Installation go get -u golang.org/x/sys/... go get -u github.com/fsnotify/fsnotify Usage The package itself is very minimalistic but provides the great benefit of observing file for changes. To get started, you have to initialize the watcher and register for monitoring the desired file path (can be file or directory): read more

Working with FTP protocol in Golang

One of the benefits of using Golang is its http package that provides an easy way to build robust REST APIs. Unfortunately, it does not provide out of the box away to build FTP server or connect to FTP server. In this article, we will explore that by demonstrating the usage of two third party packages that allow that. Connecting to FTP server The most robust and broadly used package that provides an FTP client build by Julien. read more