Removed a potentially unnecessary temporary variable.
(I'm not sure if it's a personal preference, because this issue is completely negligible.)
2:This reduces a redundant check. When tagValue is empty, we can first check whether field.Name is empty before assigning it.With this approach, the comment in the second block can also be removed.
3:The second invocation of k, v := head(opt, "=") in the original code appears to be unnecessary and can be removed.