version

package standard library
go1.26.11 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteHeader

func WriteHeader(w io.Writer, v Version) (int, error)

WriteHeader writes a header for a trace version v to w.

Types

type Version

type Version uint32

Version represents the version of a trace file.

const (
	Go111   Version = 11 // v1
	Go119   Version = 19 // v1
	Go121   Version = 21 // v1
	Go122   Version = 22 // v2
	Go123   Version = 23 // v2
	Go125   Version = 25 // v2
	Go126   Version = 26 // v2
	Current         = Go126
)

func ReadHeader

func ReadHeader(r io.Reader) (Version, error)

ReadHeader reads the version of the trace out of the trace file's header, whose prefix must be present in v.

func (Version) EventName added in go1.25.0

func (v Version) EventName(typ tracev2.EventType) string

EventName returns a string name of a wire format event for a particular trace version.

func (Version) Specs

func (v Version) Specs() []tracev2.EventSpec

Specs returns the set of event.Specs for this version.

func (Version) Valid

func (v Version) Valid() bool

Jump to

Keyboard shortcuts

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