Skip to content

Go alias/types for maps and slices. Thread-safe types also supported.

License

Notifications You must be signed in to change notification settings

kovacou/go-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go types

This package provides alias/types for maps and slices.
Thread-safe types also supported.

Support atomic

Maps :

Alias Type
Map map[string]any

Slices :

Alias Type
Ints []int
Uints []uint
Int64s []int64
Uint64s []uint64
Floats []float64
Strings []string
Bytes []byte
Bools []bool
Slice []any

Time & Date :

Alias Wrapper Type
Date NewDate() Date
DateTime NewDateTime() DateTime

Support sync

You can use the wrapper types.SyncXXX() :

m := types.SyncMap()
Alias Wrapper Type
TSafeMap SyncMap() map[string]any
TSafeStrings SyncStrings() []string
TSafeInts SyncInts() []int
TSafeUints SyncUints() []uint
TSafeInt64s SyncInt64s() []int64
TSafeUint64s SyncUint64s() []uint64

About

Go alias/types for maps and slices. Thread-safe types also supported.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages