
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
gopkg.in/nullbio/null.v6
null-extended is a library with reasonable options for dealing with nullable SQL and JSON values
Types in null
will only be considered null on null input, and will JSON encode to null
.
All types implement sql.Scanner
and driver.Valuer
, so you can use this library in place of sql.NullXXX
. All types also implement: encoding.TextMarshaler
, encoding.TextUnmarshaler
, json.Marshaler
, json.Unmarshaler
and sql.Scanner
.
Install:
go get -u "gopkg.in/nullbio/null.v6"
import "gopkg.in/nullbio/null.v6"
The following are all types supported in this package. All types will marshal to JSON null if Invalid or SQL source data is null.
Nullable []byte.
Will marshal to JSON null if Invalid. []byte{} input will not produce an Invalid JSON, but []byte(nil) will. This should be used for storing raw JSON in the database.
Also has null.JSON.Marshal
and null.JSON.Unmarshal
helpers to marshal and unmarshal foreign objects.
Nullable []byte.
[]byte{} input will not produce an Invalid Bytes, but []byte(nil) will. This should be used for storing binary data (bytea in PSQL for example) in the database.
Nullable string.
Nullable byte.
Nullable bool.
Nullable time.Time
Marshals to JSON null if SQL source data is null. Uses time.Time
's marshaler.
Nullable float32.
Nullable float64.
Nullable int.
Nullable int8.
Nullable int16.
Nullable int32.
Nullable int64.
Nullable uint.
Nullable uint8.
Nullable uint16.
Nullable int32.
Nullable uint64.
json
's ",omitempty"
struct tag does not work correctly right now. It will never omit a null or empty String. This might be fixed eventually.
BSD
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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.