- Notifications
You must be signed in to change notification settings - Fork1
Libraries that enhance your Go code
License
NotificationsYou must be signed in to change notification settings
nikhilsbhat/common
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Generic functions that would be handy while building your Golang utility.
This library stands on the shoulders of various libraries built by some awesome folks.
Get the latest version of GoCD sdk usinggo get command.
go get github.com/nikhilsbhat/common@latest
Get specific version of the same.
go get github.com/nikhilsbhat/common@v0.0.2
package mainimport ("github.com/nikhilsbhat/common/renderer""github.com/sirupsen/logrus""log""os")typeObjectstruct {NamestringDatestring}funcmain() {newObject:= []Object{{Name:"nikhil",Date:"01-01-2024"},{Name:"john",Date:"01-02-2024"},}logger:=logrus.New()render:=renderer.GetRenderer(os.Stdout,logger,true,true,false,false,false)iferr:=render.Render(newObject);err!=nil {log.Fatal(err)}}
Above code should generate yaml as below:
----Date:01-01-2024Name:nikhil-Date:01-02-2024Name:john
More example of the libraries can be foundhere.
About
Libraries that enhance your Go code
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.