Skip to content

Releases: zxdev/env

v2.0.10

28 Feb 11:47

Choose a tag to compare

bug fix: check nil error

v2.0.9

25 Feb 05:16

Choose a tag to compare

new graceful api that supports external shutdown functions

        var a Action
	grace := env.NewGraceful().Init(a.Init00, a.Init01, a.Init02)
	defer grace.Shutdown()
	grace.Register(func() { log.Println("extra: non-grace shutdown func") })
	grace.Wait()

v2.0.8: update lock.go

21 Feb 15:38
762e7b2

Choose a tag to compare

this adjust the env.Lock internals

v2.0.7

21 Feb 05:14

Choose a tag to compare

made GraceInit a grace struct method

grace := env.NewGraceful().Init(obj1,obj2)
grace.Done()
defer grace.Wait()

v2.0.6

20 Feb 18:04
1bdf398

Choose a tag to compare

updated env.Lock to only support .Lock() and .Unlock() methods

var lock = env.Lock{Path: "/tmp", TTL: time.Hour}
if lock.Lock() {
	return
}
defer lock.Unlock()

v2.0.5

04 Feb 04:10

Choose a tag to compare

  • refactor grace to support legacy func(context.Context) types
  • refactor expire
  • add env_test.go
  • add example/main.go

v2.0.4

03 Feb 20:23

Choose a tag to compare

add the /v2 ending

v2.0.3

03 Feb 20:15

Choose a tag to compare

semantic versioning bump, nothing more

v2.0.1

03 Feb 20:11

Choose a tag to compare

Major revision of graceful breaking the API and a few other minor changes.

v1.7.10

18 Dec 06:23
3e3d112

Choose a tag to compare

Add Conf function for populating a json configuration file with default structure values that can then be overloaded by a file source.