runtime

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2025 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package runtime provides functionality for detecting and handling. Go runtime-specific directives and functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRuntimeHookFunction

func IsRuntimeHookFunction(name string) bool

IsRuntimeHookFunction checks if a function name is a known runtime hook.

Types

type DirectiveInfo

type DirectiveInfo struct {
	Type      DirectiveType
	Directive string
	Valid     bool
}

DirectiveInfo contains information about a runtime directive found on a function.

func HasRuntimeDirective

func HasRuntimeDirective(fn *ast.FuncDecl) *DirectiveInfo

HasRuntimeDirective checks if a function declaration has any runtime directive.

type DirectiveType

type DirectiveType int

DirectiveType represents different types of Go compiler directives.

const (
	DirectiveNone DirectiveType = iota
	DirectiveNosplit
	DirectiveNoinline
	DirectiveNorace
	DirectiveNocheckptr
	DirectiveLinkname
	DirectiveCGoExport // CGo export directive
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL