package report

import "github.com/lucor/goinfo/report"

Index

Types

type GoEnv

type GoEnv struct {
	Filter []string // Filter defines a subset of vars to returns. Leave empty to return all.
}

GoEnv collects the info about the Go environment using the go env tool

func (*GoEnv) Info

func (i *GoEnv) Info() (goinfo.Info, error)

Info returns the collected info

func (*GoEnv) Summary

func (i *GoEnv) Summary() string

Summary return the summary

type GoMod

type GoMod struct {
	//Module is the module to look for into WorkDir and GOPATH as fallback.
	// If not specified the module present in WorkDir will be returned, if any.
	Module string
	// WorkDir is the directory where to look for the go module. If not
	// specified, default to current directory.
	WorkDir string
}

GoMod returns the info about a Go module The info returned are defined into goModInfo

func (*GoMod) Info

func (i *GoMod) Info() (goinfo.Info, error)

Info returns the collected info

func (*GoMod) Summary

func (i *GoMod) Summary() string

Summary return the summary

type GoVersion

type GoVersion struct{}

GoVersion collects the info about the Go version using the go version command

func (*GoVersion) Info

func (i *GoVersion) Info() (goinfo.Info, error)

Info returns the collected info

func (*GoVersion) Summary

func (i *GoVersion) Summary() string

Summary return the summary

type OS

type OS struct{}

OS returns the info about the OS distro

func (*OS) Info

func (i *OS) Info() (goinfo.Info, error)

Info returns the collected info

func (*OS) Summary

func (i *OS) Summary() string

Summary return the summary

Source Files

go_env.go go_module.go go_version.go os.go os_xdg.go

Version
v0.9.0 (latest)
Published
Feb 26, 2023
Platform
linux/amd64
Imports
12 packages
Last checked
3 hours ago

Tools for package owners.