+
Skip to content

Tags: mitranim/gg

Tags

v0.1.29

Toggle v0.1.29's commit message
goroutine-local storage (dynamic variables); other tweaks

Added support for GLS:
- `DynVar`
- `GlsGo`
- `GlsGo1`
- `GlsRun`
- `GlsRun1`
- `GlsSet`
- `GlsSnap`
- `GlsClear`
- `Gls`
- `GlsVal`
- `Gid`
- `GidFunc`

Also added an implementation of "stack ID", out of horrified
fascination with the idea:
- `Sid`
- `WithSid`
- `WithGivenSid`

Other additions:
- `Once`
- `Catch1`: alias for Catch10
- `TypeName`
- `SendZero`
- `Chan.SendZero`
- `gtest.MapEmpty`

Breaking changes which may affect consumer code:
- Renamed `Sum` to `SumBy`.
- Added `Sum`: non-variadic version of `Plus`.
- Dropped `SliceFrom` in favor of `Union`.

Breaking changes not expected to affect consumer code:
- `Trace` is now `[]uintptr` rather than `[]Caller`.

`CaptureTrace` is no longer limited to 64 frames,
and always returns the full trace after the skip.

Improved `Atom`. Now uses `atomic.Pointer` instead of `atomic.Value`.
This is now an extended version of `atomic.Pointer`, with shortcuts
for storing copies of values. Unlike the previous implementation,
this can store an interface value without panicking on inconsistent
concrete types.

Added missing `go:build` annotations to allow compilation on `arm`
(the 32-bit version; arm64 always worked).

Deprecation: `Lazy` and `NewLazy` are deprecated in favor of `Once`.

v0.1.28

Toggle v0.1.28's commit message
`gsql.Arr` now parses recursively

v0.1.27

Toggle v0.1.27's commit message
minor fix in `gsql.Arr` parsing

v0.1.26

Toggle v0.1.26's commit message
misc additions and tweaks

Add `gg.Errs.Add`.
Add `gg.ErrStr.Is`.
Add `gg.OrdMap.Keys`.
Add `gsql.ScanAnyOpt`.
Add `gsql.ScanReflectOpt`.
Improve `gsql.Arr` parsing (still incomplete).
Properly elide `grepr.Conf.Pkg` from all type names.
Minor breaking: drop `gg.Newline`.
Minor breaking: drop `gg.Space`.

v0.1.25

Toggle v0.1.25's commit message
minor fixes and additions

Fix `gg.Mem.UnmarshalJSON`.
Add `gg.Errs.Format`.
Add `gg.Errs.AppendStackTo`.
Add `gg.TakeLast`.
Add `gg.Slice.TakeLast`.

v0.1.24

Toggle v0.1.24's commit message
simplify "conc", "mem", fix num conversion, improve SQL scan

Breaking:

* Drop `gg.ConcSlice`. Just call `gg.Conc`.
* Drop `gg.ConcRaceSlice`. Just call `gg.ConcRace`.
* Drop `gg.Timed`.
* All methods of `gg.Mem` which returned `gg.Timed` now simply return
  the inner value.
* `gg.Mem` now treats zero duration as indefinite.
* Drop `gg.Errs.LenNil`.
* Drop `gg.Errs.LenNotNil`.
* Drop `gg.Errs.IsEmpty`.
* Rename `gg.Errs.IsNotEmpty` → `gg.Errs.HasErr`.

Additions:

* Add `gg.Errs.Count`.
* Add `gg.DurForever`.
* Add `gg.IsFrac`.
* Add `gg.MinSafeIntFloat32`.
* Add `gg.MaxSafeIntFloat32`.
* Add `gg.MinSafeIntFloat64`.
* Add `gg.MaxSafeIntFloat64`.

Improvements:

Fixed various false negatives and false positives in `gg.NumConv`.
The function now explicitly tests the source number against known
safe numeric ranges for the particular combination of source type
and target type.

`gsql.ScanAny` and `gsql.ScanReflect` now accept and support pointers
to interface values hosting concrete values. Earlier versions treated
interfaces as opaque scalars, without dereferencing to the underlying
value. Interfaces without an underlying concrete type will continue
failing to scan as before. Assuming a matching query, the following
code should now work:

```go
rows := gg.Try1(conn.QueryContext(ctx, someQuery))
defer gg.Close(rows)
tar := any(struct{Id string `db:"id"`}{})
gsql.ScanAny(rows, &tar)
```

Slightly improved some error messages in `gtest`.

v0.1.23

Toggle v0.1.23's commit message
graph tool supports skipping files

v0.1.22

Toggle v0.1.22's commit message
misc tweaks and additions

Changes:

* `gg.Union` always dedups elements, like `Uniq`.

Additions:

* Add `gg.Send`.
* Add `gg.Chan.Send`.
* Add `gg.Receive`.
* Add `gg.Chan.Receive`.
* Add `gg.GetStrict`.
* Add `gg.Slice.GetStrict`.

v0.1.21

Toggle v0.1.21's commit message
updates in `gg.LazyIniter`

Breaking:

* Remove `gg.LazyIniter.Ptr`.

Misc:

* Fix potential concurrency issues in `gg.LazyIniter`.
* Add `gg.LazyIniter.Clear`.
* Add `gg.LazyIniter.Reset`.

v0.1.20

Toggle v0.1.20's commit message
more slice functions, set methods, fixes

* Add `gg.Set.IsEmpty`.
* Add `gg.Set.IsNotEmpty`.
* Add `gg.TakeLastWhile`.
* Add `gg.Slice.TakeLastWhile`.
* Add `gg.DropLastWhile`.
* Add `gg.Slice.DropLastWhile`.
* Add `gg.FindLastIndex`.
* Add `gg.Slice.FindLastIndex`.
* Add `gg.FindLast`.
* Add `gg.Slice.FindLast`.
* Add `gg.FoundLast`.
* Add `gg.Slice.FoundLast`.
* Bugfix `gg.TakeWhile`.
* Bugfix `gg.DropWhile`.
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载