access

package
v0.0.0-...-1a61898 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package access provides utilities for determining the accessibility of types in Go.

Index

Constants

View Source
const (
	// The type is not accessible
	NotAccessible = -1
	// Accessibility is not defined
	AccessibilityUndefined Accessibility = 0

	// The type is accessible only within its own package
	AccessibleInsidePackage = 1

	// The type is accessible from any package
	AccessibleEverywhere = 2
)

Variables

This section is empty.

Functions

func Info

func Info[T any](_ T) (Namedness, Accessibility)

Types

type Accessibility

type Accessibility int

func (Accessibility) String

func (t Accessibility) String() string

type Namedness

type Namedness int
const (
	NamednessUndefined Namedness = iota
	AnonymousType
	NamedType
)

func (Namedness) String

func (t Namedness) String() string

Jump to

Keyboard shortcuts

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