Skip to content

v0.3.1

Choose a tag to compare

@ableinc ableinc released this 24 May 23:49
· 1 commit to main since this release

v0.3.1

Bug Fixes

  • Inline comments are now stripped from .env values — values like DATABASE_URL=postgres://... # or sqlite3:///data/app.db previously included the comment text verbatim, causing connection errors. Anything after # or \t# in an unquoted value is now discarded.

New Features

  • Single-quoted values — 'value' is now handled alongside "value". Quoted values are taken verbatim with no comment stripping, allowing # to appear inside them freely.

Performance

  • Removed goroutine-based parallel env loading — os.Setenv acquires an internal global lock on every call, so concurrent goroutines were serializing anyway while adding goroutine creation and sync.WaitGroup overhead. LoadEnv now uses a simple sequential loop, which is measurably faster. This also removes the sync and runtime import dependencies.

Internal

  • Removed MAX_ENV_THRESHOLD constant and setEnvFromPairs helper (both made dead by the above change)
  • Fixed a variable shadowing issue in parseEnvFile where the closing-quote search index end shadowed the outer newline-offset end