cmd

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// VERSION is the current version of goack
	VERSION = `1.0.0`
)

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute performs the root command.

func Print

func Print(file string, lines []string, lineNums []int, opts *options)

Print the matching items from a given file.

Types

type Config

type Config struct {
	IgnoreDirs []string `json:"ignore-dirs"`
	IgnoreExts []string `json:"ignore-exts"`
	// contains filtered or unexported fields
}

Config contains the structure of the configuration file located at /home/$USER/.goackrc/config.json

func (*Config) IgnoreDir

func (c *Config) IgnoreDir(file string) bool

IgnoreDir returns true if the given filename appears in the IgnoreDirs array

func (*Config) IgnoreExt added in v1.0.2

func (c *Config) IgnoreExt(file string) bool

IgnoreExt returns true if a file should be ignored based on its extension.

Jump to

Keyboard shortcuts

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