The reflect package specifies a &quot;convention&quot; which it uses to extract key-value pairs from a struct tag using the Get method:<p><a href="https:&#x2F;&#x2F;golang.org&#x2F;pkg&#x2F;reflect&#x2F;#StructTag" rel="nofollow">https:&#x2F;&#x2F;golang.org&#x2F;pkg&#x2F;reflect&#x2F;#StructTag</a><p>There&#x27;s no need to parse the entire tag string yourself and it&#x27;s safe to assume other libraries will work with the convention. If they don&#x27;t, that&#x27;s not your fault and it would break with other tags like &quot;json&quot; and &quot;xml&quot; anyway.