Standard Library

GoUnsafe

Go stdlib package — unsafe. Auto-indexed from CDN. Method-level security roles have not been annotated; rule writers should inspect the source before use.

Other Methods

.Add()Neutral
#
Signature
Add(ptr Pointer, len IntegerType) Pointer

The function Add adds len to ptr and returns the updated pointer

.Alignof()Neutral
#
Signature
Alignof(x ArbitraryType) uintptr

Alignof takes an expression x of any type and returns the required alignment

.Offsetof()Neutral
#
Signature
Offsetof(x ArbitraryType) uintptr

Offsetof returns the offset within the struct of the field represented by x,

.Sizeof()Neutral
#
Signature
Sizeof(x ArbitraryType) uintptr

Sizeof takes an expression x of any type and returns the size in bytes

.Slice()Neutral
#
Signature
Slice(ptr *ArbitraryType, len IntegerType) []ArbitraryType

The function Slice returns a slice whose underlying array starts at ptr

.SliceData()Neutral
#
Signature
SliceData(slice []ArbitraryType) *ArbitraryType

SliceData returns a pointer to the underlying array of the argument

.String()Neutral
#
Signature
String(ptr *byte, len IntegerType) string

String returns a string value whose underlying bytes

.StringData()Neutral
#
Signature
StringData(str string) *byte

StringData returns a pointer to the underlying bytes of str.

.ArbitraryType()Neutral
#
Signature
type ArbitraryType ...

ArbitraryType is here for the purposes of documentation only and is not actually

.IntegerType()Neutral
#
Signature
type IntegerType ...

IntegerType is here for the purposes of documentation only and is not actually

Fully-Qualified Names

FQNField
unsafefqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import ...  # unsafe