[17] Results

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 : 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 final or effective URL with Request.URL example

golang final-url effective-url request-url

There are times when we query a web server, it will re-direct internally and returns back with a slightly different….... 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 : Parsing or breaking down URL

golang url parse fragment

Golang provides an easy way to consume and parse URL. It has a very neat package ( http://golang.org/pkg/net/url.... read more

Golang : How to validate URL the right way

golang validate-url govalidator is-url

Validating input from user or external sources is critical and needed to ensure that your program will not simply process….... read more

Golang : Format strings to SEO friendly URL example

golang seo-url regexp normalize unicode


You want to take a string and format it to SEO friendly URL. SEO friendly means no uppercase, underscore….... read more

Golang : How to get URL port?

golang url parse splithostport

From the previous tutorial on how to break down a URL string, a reader emailed me wanting to….... read more