Golang Get Struct Tag Values

Golang Gopher

Hi. In this post I’ll show how can get struct tag values in Golang. Firstly, very simple don’t be afraid.

Let’s start. Before starting, this post will show you reflection package’s a little part.

Import Reflection Package

Let’s suppose we have struct like this to create database columns. Our scenario is about ORM’s table generator: