![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
github.com/hashicorp/go-envparse
A minimal Go environment variable parser. It's intended to be used to parse
.env
style files similar to godotenv or
rubydotenv, but perform minimal
allocations, handle more complex quoting, and be better tested.
Parsing a line does 2 allocations regardless of line length or complexity.
The parser supports JSON strings which allows for cross-language/platform encoding of arbitrarily complex data.
For example if you are parsing environment variables from a templated file, the template can JSON encode data that may contain newlines:
FOO={{ some_template_function | toJSON }}
...would be templated to:
FOO="The template value\nmay have included\nsome newlines!\n\ud83d\udd25"
...and envparse.Parse()
would return:
map[string]string{
"FOO": "The template value\nmay have included\nsome newlines!\n🔥",
}
The following common features are intentionally missing:
However, comments, unquoted, single quoted, and double quoted text may all be used within a single value:
SOME_KEY = normal unquoted \text 'plus single quoted\' "\"double quoted " # EOL
...parses to:
map[string]string{
"SOME_KEY": `normal unquoted \text plus single quoted\ "double quoted `
}
(Note the trailing space inside the double quote is kept, but the space between
the final "
and #
is trimmed.)
[A-Za-z_][A-Za-z0-9_]?
export
which will be ignoredFOO=bar baz
#
, "
, '
, or newlineFOO="bar baz"
\uXXXX
, \r
, \n
, \t
, \\
, and
\"
"
FOO='bar baz'
'
See envparse_test.go
for examples of valid and invalid data.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.