files

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListDir

func ListDir(directory string, recursive bool, vi map[string]bool) ([]string, error)

func ReadFile

func ReadFile(fileName string) (string, error)

func UpdateFile

func UpdateFile(fileName string, status chan string, writer func(string, []byte, os.FileMode) error) error

Types

type HashGetter

type HashGetter struct {
	// contains filtered or unexported fields
}

func NewHashGetter

func NewHashGetter() *HashGetter

func (*HashGetter) GetHashForAction

func (h *HashGetter) GetHashForAction(a SemverAction) (string, error)

type SemverAction

type SemverAction struct {
	Action  string
	Version string
	Full    string
}

func FindSemverActions

func FindSemverActions(fileContents string) []SemverAction

FindSemverActions finds all actions in a file that match patterns like:

uses: actions/checkout@v2
uses: github/codeql-action/init@v3

It returns the matches.

type Update

type Update struct {
	FileName   string
	OldVersion string
	NewVersion string
	FullMatch  string
}

Jump to

Keyboard shortcuts

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