go-modfile-information

command module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2024 License: MIT Imports: 3 Imported by: ? 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.

README

Fetch go mod information

Build Integration Test

Summary

This action will let you retrieve some information in your go.mod file and export it in github action variables. For now, only the go version and go module will be exported.

See the examples for how to use it

Inputs
Input Description Default value
modfile An example mandatory input go.mod
Outputs
Output Description
go_version Go version of the module
go_module Go module name

Examples

Or see this workflow

    ...
    - name: Get go mod info
      id: gomod
      uses: pawndev/go-modfile-information@v1.0.0
      with:
        modfile: go.mod # optional default to `go.mod`
    - name: Print go mod information
      run: |
        echo "${{ steps.gomod.outputs.go_version }}"
        echo "${{ steps.gomod.outputs.go_module }}"
Using the optional input
with:
  modfile: other-go.mod

Testing locally

Be sure to have act locally and available il your $PATH. And then you can make test to launch the project locally.

Folder tests contains another go.mod file with old version format using only major and minor without the patch number 1.21.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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