Skip to content

dalikewara/strcgo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

strcgo

go.dev reference GitHub go.mod Go version GitHub tag (latest SemVer) GitHub license

strcgo provides custom helpers to handle tasks related to struct.

Getting started

Installation

You can use the go get method:

go get github.com/dalikewara/strcgo

Usage

You can check all available helper functions through the related files above (get.go, etc). For example, if you want to get tag value from a struct field, you can do like this:

type s struct {
    ID   uint64 `json:"id"`
    Name string `json:"name"`
}

tagValue := strcgo.GetTagValueFromField(s{}, "Name", "json")

fmt.Println(tagValue) // output: name

Release

Changelog

Read at CHANGELOG.md

Credits

Copyright © 2024 Dali Kewara

License

MIT License

About

strcgo provides custom helpers to handle tasks related to struct

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published