ensure

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RequiredVersion

func RequiredVersion() error

RequiredVersion makes sure the version of the tool currently running is the same as the one required in the current working directory's "go.mod" file by calling `syscall.Exec` with the relevant `go run` command if necessary to replace the current process with one using the required version.

If this returns `nil`, the current process is running the correct version of the tool and can proceed with it's intended purpose. If it returns an error, that should be presented to the user before exiting with a non-0 status code. If the process was correctly substituted, this function never returns control to its caller (as the process has been replaced).

func StartupVersion

func StartupVersion() string

StartupVersion returns the version of Orchestrion that has started this process. If this is the same as version.Tag, this process hasn't needed to be re-started. This is useful to provide complete information about proxied executions (e.g: in the output of `orchestrion version`), in cases where a "globally" installed binary substituted itself for a version from `go.mod`.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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