buildinfo

package
v1.23.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

buildinfoパッケージは、Goバイナリに埋め込まれた情報にアクセスするための機能を提供します。 これには、Goツールチェーンのバージョン、および使用されたモジュールのセット(モジュールモードでビルドされたバイナリの場合)が含まれます。

ビルド情報は、現在実行中のバイナリでruntime/debug.ReadBuildInfoを使用して利用できます。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildInfo

type BuildInfo = debug.BuildInfo

ビルド情報のための型エイリアスです。 ここに型を移動することはできません。なぜなら、 runtime/debugがこのパッケージをインポートする必要があるため、 依存関係が大きくなるためです。

func Read

func Read(r io.ReaderAt) (*BuildInfo, error)

Readは、指定されたReaderAtを介してアクセスされるGoバイナリファイルに埋め込まれたビルド情報を返します。 ほとんどの情報は、モジュールサポートでビルドされたバイナリでのみ利用可能です。

func ReadFile

func ReadFile(name string) (info *BuildInfo, err error)

ReadFileは、指定されたパスのGoバイナリファイルに埋め込まれたビルド情報を返します。 ほとんどの情報は、モジュールサポートでビルドされたバイナリでのみ利用可能です。

Jump to

Keyboard shortcuts

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