From 60253426aeba7ab042e228cbfb3e4dfdc82276f2 Mon Sep 17 00:00:00 2001 From: Tai Groot Date: Mon, 2 Mar 2026 00:13:33 +0000 Subject: [PATCH] docs: update README for v0.3.0 - Add CI badges (test + govulncheck) - Bump minimum Go version to 1.26 - Add IsSet, AllKeys, AllSettings to API table - Remove outdated migration guide --- README.md | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index 0254412..61cd9e6 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # JETY +[![test](https://github.com/taigrr/jety/actions/workflows/test.yml/badge.svg)](https://github.com/taigrr/jety/actions/workflows/test.yml) +[![govulncheck](https://github.com/taigrr/jety/actions/workflows/govulncheck.yml/badge.svg)](https://github.com/taigrr/jety/actions/workflows/govulncheck.yml) + JSON, ENV, TOML, YAML A lightweight Go configuration management library supporting JSON, ENV, TOML, and YAML formats. @@ -12,7 +15,7 @@ Originally built to support [grlx](http://github.com/gogrlx/grlx). go get github.com/taigrr/jety ``` -Requires Go 1.25.5 or later. +Requires Go 1.26 or later. ## Quick Start @@ -102,36 +105,6 @@ export MYAPP_SERVICES_CLOUD_VAR=override_value **Note**: Environment variables override defaults but config files take highest precedence. -## Migration Guide - -### From v0.x to v1.x - -#### Breaking Changes - -1. **`WriteConfig()` now returns `error`** - - ```go - // Before - jety.WriteConfig() - - // After - if err := jety.WriteConfig(); err != nil { - // handle error - } - // Or if you want to ignore the error: - _ = jety.WriteConfig() - ``` - -2. **Go 1.25.5 minimum required** - - Update your Go version or pin to an older jety release. - -#### Non-Breaking Improvements - -- Getters (`GetBool`, `GetInt`, `GetDuration`) now return zero values instead of panicking on unknown types -- Added `int64` support in `GetInt`, `GetIntSlice`, and `GetDuration` -- Improved env var parsing (handles values containing `=`) - ## API ### Configuration @@ -159,6 +132,9 @@ export MYAPP_SERVICES_CLOUD_VAR=override_value | `GetStringSlice(key)` | Get as []string | | `GetIntSlice(key)` | Get as []int | | `GetStringMap(key)` | Get as map[string]string | +| `IsSet(key)` | Check if key has a value | +| `AllKeys()` | List all known keys | +| `AllSettings()` | Get all values as a map | ### Environment