version

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 3 Imported by: 2 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

Overview

Package version is weft's one version string: the framework module's release tag, stamped into the otel resource and, by the platform (weftbase, which embeds a weft version and reports it), Studio's api/meta, the devtools panel bundle, the runtime's registration and the weftbase binary's version output. It imports nothing but the standard library, so any layer can carry it.

Index

Examples

Constants

View Source
const Version = "v0.25.0"

Version is the framework module's release tag. The release process bumps it with the tag; it moves for nothing else. weftbase reads this line for its panel bundle's stamp (its studio/web/scripts/ weft-version.ts, through `go list -m`) and its tests fail when its Studio or embedded panel disagree with the weft it builds against. The second place to bump is core/observe.go's own version literal (the weft.version every run stamps; core imports nothing of this module), which otel/hardening_test.go pins against this one.

Variables

This section is empty.

Functions

func Runtime

func Runtime() string

Runtime reports the version of the framework module this binary was built from, read from debug.ReadBuildInfo: the main module's version when the binary is weft's own, else the version of the github.com/weftbase/weft dependency (its replacement's, when replaced by another version). Where the build info has no version — inside the workspace or a test, where it reads "(devel)", or a replacement by a local directory — it returns Version, the tag the source carries. So does a build stamped from version control rather than a tag (Go 1.24 and later): a pseudo-version (v0.9.1-0.20260101120000- abcdef123456) or a "+dirty" one names a commit, not a release.

Example

Runtime is what a binary prints for its version: the tag a consumer built against, or the source's own tag inside the workspace.

package main

import (
	"fmt"

	"github.com/weftbase/weft/version"
)

func main() {
	v := version.Runtime()
	fmt.Println(v == version.Version) // in this repository's tests, build info reads "(devel)"
}
Output:
true

Types

This section is empty.

Jump to

Keyboard shortcuts

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