mirror of https://github.com/cheat/cheat.git
commit
b53a14b1a7
|
@ -9,13 +9,13 @@ On Unix-like systems, you may simply paste the following snippet into your termi
|
|||
|
||||
```sh
|
||||
cd /tmp \
|
||||
&& wget https://github.com/cheat/cheat/releases/download/4.2.7/cheat-linux-amd64.gz \
|
||||
&& wget https://github.com/cheat/cheat/releases/download/4.3.0/cheat-linux-amd64.gz \
|
||||
&& gunzip cheat-linux-amd64.gz \
|
||||
&& chmod +x cheat-linux-amd64 \
|
||||
&& sudo mv cheat-linux-amd64 /usr/local/bin/cheat
|
||||
```
|
||||
|
||||
You may need to need to change the version number (`4.2.7`) and the archive
|
||||
You may need to need to change the version number (`4.3.0`) and the archive
|
||||
(`cheat-linux-amd64.gz`) depending on your platform.
|
||||
|
||||
See the [releases page][releases] for a list of supported platforms.
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/cheat/cheat/internal/config"
|
||||
)
|
||||
|
||||
func cmdConf(opts map[string]interface{}, conf config.Config) {
|
||||
fmt.Println(conf.Path)
|
||||
}
|
|
@ -15,6 +15,7 @@ Options:
|
|||
-T --tags List all tags in use
|
||||
-v --version Print the version number
|
||||
--rm=<cheatsheet> Remove (delete) <cheatsheet>
|
||||
--conf Display the config file path
|
||||
|
||||
Examples:
|
||||
|
||||
|
@ -53,3 +54,6 @@ Examples:
|
|||
|
||||
To remove (delete) the foo/bar cheatsheet:
|
||||
cheat --rm foo/bar
|
||||
|
||||
To view the configuration file path:
|
||||
cheat --conf
|
||||
|
|
|
@ -16,7 +16,7 @@ import (
|
|||
"github.com/cheat/cheat/internal/installer"
|
||||
)
|
||||
|
||||
const version = "4.2.7"
|
||||
const version = "4.3.0"
|
||||
|
||||
func main() {
|
||||
|
||||
|
@ -120,6 +120,9 @@ func main() {
|
|||
var cmd func(map[string]interface{}, config.Config)
|
||||
|
||||
switch {
|
||||
case opts["--conf"].(bool):
|
||||
cmd = cmdConf
|
||||
|
||||
case opts["--directories"].(bool):
|
||||
cmd = cmdDirectories
|
||||
|
||||
|
|
|
@ -24,7 +24,9 @@ colorize: false
|
|||
formatter: terminal
|
||||
|
||||
# Through which pager should output be piped?
|
||||
# pager: less -FRX # <- recommended where available
|
||||
# 'less -FRX' is recommended on Unix systems
|
||||
# 'more' is recommended on Windows
|
||||
pager: PAGER_PATH
|
||||
|
||||
# The paths at which cheatsheets are available. Tags associated with a cheatpath
|
||||
# are automatically attached to all cheatsheets residing on that path.
|
||||
|
|
|
@ -24,6 +24,7 @@ Options:
|
|||
-T --tags List all tags in use
|
||||
-v --version Print the version number
|
||||
--rm=<cheatsheet> Remove (delete) <cheatsheet>
|
||||
--conf Display the config file path
|
||||
|
||||
Examples:
|
||||
|
||||
|
@ -62,5 +63,8 @@ Examples:
|
|||
|
||||
To remove (delete) the foo/bar cheatsheet:
|
||||
cheat --rm foo/bar
|
||||
|
||||
To view the configuration file path:
|
||||
cheat --conf
|
||||
`)
|
||||
}
|
||||
|
|
|
@ -15,7 +15,9 @@ colorize: false
|
|||
formatter: terminal
|
||||
|
||||
# Through which pager should output be piped?
|
||||
# pager: less -FRX # <- recommended where available
|
||||
# 'less -FRX' is recommended on Unix systems
|
||||
# 'more' is recommended on Windows
|
||||
pager: PAGER_PATH
|
||||
|
||||
# The paths at which cheatsheets are available. Tags associated with a cheatpath
|
||||
# are automatically attached to all cheatsheets residing on that path.
|
||||
|
|
15
go.mod
15
go.mod
|
@ -1,18 +1,21 @@
|
|||
module github.com/cheat/cheat
|
||||
|
||||
go 1.14
|
||||
go 1.19
|
||||
|
||||
require (
|
||||
github.com/alecthomas/chroma v0.10.0
|
||||
github.com/davecgh/go-spew v1.1.1
|
||||
github.com/dlclark/regexp2 v1.7.0 // indirect
|
||||
github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/mattn/go-isatty v0.0.14
|
||||
github.com/mitchellh/go-homedir v1.1.0
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
|
||||
golang.org/x/sys v0.0.0-20220731174439-a90be440212d // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
|
||||
gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0
|
||||
gopkg.in/yaml.v2 v2.4.0
|
||||
)
|
||||
|
||||
require (
|
||||
github.com/dlclark/regexp2 v1.7.0 // indirect
|
||||
github.com/kr/text v0.2.0 // indirect
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect
|
||||
golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect
|
||||
)
|
||||
|
|
4
go.sum
4
go.sum
|
@ -25,8 +25,8 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
|
|||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220731174439-a90be440212d h1:Sv5ogFZatcgIMMtBSTTAgMYsicp25MXBubjXNDKwm80=
|
||||
golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 h1:9vYwv7OjYaky/tlAeD7C4oC9EsPTlaFl1H2jS++V+ME=
|
||||
golang.org/x/sys v0.0.0-20220804214406-8e32c043e418/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
|
|
|
@ -3,9 +3,7 @@ package config
|
|||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
cp "github.com/cheat/cheat/internal/cheatpath"
|
||||
|
@ -22,6 +20,7 @@ type Config struct {
|
|||
Style string `yaml:"style"`
|
||||
Formatter string `yaml:"formatter"`
|
||||
Pager string `yaml:"pager"`
|
||||
Path string
|
||||
}
|
||||
|
||||
// New returns a new Config struct
|
||||
|
@ -36,6 +35,9 @@ func New(opts map[string]interface{}, confPath string, resolve bool) (Config, er
|
|||
// initialize a config object
|
||||
conf := Config{}
|
||||
|
||||
// store the config path
|
||||
conf.Path = confPath
|
||||
|
||||
// unmarshal the yaml
|
||||
err = yaml.UnmarshalStrict(buf, &conf)
|
||||
if err != nil {
|
||||
|
@ -93,28 +95,11 @@ func New(opts map[string]interface{}, confPath string, resolve bool) (Config, er
|
|||
conf.Cheatpaths[i].Path = expanded
|
||||
}
|
||||
|
||||
// if an editor was not provided in the configs, look to envvars
|
||||
// if an editor was not provided in the configs, attempt to choose one
|
||||
// that's appropriate for the environment
|
||||
if conf.Editor == "" {
|
||||
if os.Getenv("VISUAL") != "" {
|
||||
conf.Editor = os.Getenv("VISUAL")
|
||||
} else if os.Getenv("EDITOR") != "" {
|
||||
conf.Editor = os.Getenv("EDITOR")
|
||||
} else if runtime.GOOS == "windows" {
|
||||
conf.Editor = "notepad"
|
||||
} else {
|
||||
// try to fall back to `nano`
|
||||
path, err := exec.LookPath("nano")
|
||||
if err != nil {
|
||||
return Config{}, fmt.Errorf("failed to locate nano: %s", err)
|
||||
}
|
||||
|
||||
// use `nano` if we found it
|
||||
if path != "" {
|
||||
conf.Editor = "nano"
|
||||
// otherwise, give up
|
||||
} else {
|
||||
return Config{}, fmt.Errorf("no editor set")
|
||||
}
|
||||
if conf.Editor, err = Editor(); err != nil {
|
||||
return Config{}, err
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -128,39 +113,8 @@ func New(opts map[string]interface{}, confPath string, resolve bool) (Config, er
|
|||
conf.Formatter = "terminal"
|
||||
}
|
||||
|
||||
// attempt to fall back to `PAGER` if a pager is not specified in configs
|
||||
// load the pager
|
||||
conf.Pager = strings.TrimSpace(conf.Pager)
|
||||
if conf.Pager == "" {
|
||||
// look for `pager`, `less`, and `more` on the system PATH
|
||||
pagerPath, _ := exec.LookPath("pager")
|
||||
lessPath, _ := exec.LookPath("less")
|
||||
morePath, _ := exec.LookPath("more")
|
||||
|
||||
// search first for a `PAGER` envvar
|
||||
if os.Getenv("PAGER") != "" {
|
||||
conf.Pager = os.Getenv("PAGER")
|
||||
|
||||
// search for `pager`
|
||||
} else if pagerPath != "" {
|
||||
conf.Pager = pagerPath
|
||||
|
||||
// search for `less`
|
||||
} else if lessPath != "" {
|
||||
conf.Pager = lessPath
|
||||
|
||||
// search for `more`
|
||||
//
|
||||
// XXX: this causes issues on some Linux systems. See:
|
||||
// https://github.com/cheat/cheat/issues/681#issuecomment-1201842334
|
||||
//
|
||||
// By checking for `more` last, we're hoping to at least mitigate
|
||||
// the frequency of this occurrence, because `pager` and `less` are
|
||||
// likely to be available on most systems on which a user is likely
|
||||
// to have installed `cheat`.
|
||||
} else if morePath != "" {
|
||||
conf.Pager = morePath
|
||||
}
|
||||
}
|
||||
|
||||
return conf, nil
|
||||
}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// Editor attempts to locate an editor that's appropriate for the environment.
|
||||
func Editor() (string, error) {
|
||||
|
||||
// default to `notepad.exe` on Windows
|
||||
if runtime.GOOS == "windows" {
|
||||
return "notepad", nil
|
||||
}
|
||||
|
||||
// look for `nano` on the `PATH`
|
||||
nano, _ := exec.LookPath("nano")
|
||||
|
||||
// search for `$VISUAL`, `$EDITOR`, and then `nano`, in that order
|
||||
for _, editor := range []string{os.Getenv("VISUAL"), os.Getenv("EDITOR"), nano} {
|
||||
if editor != "" {
|
||||
return editor, nil
|
||||
}
|
||||
}
|
||||
|
||||
// return an error if no path is found
|
||||
return "", fmt.Errorf("no editor set")
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package config
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
)
|
||||
|
||||
// Pager attempts to locate a pager that's appropriate for the environment.
|
||||
func Pager() string {
|
||||
|
||||
// if $PAGER is set, return the corresponding pager
|
||||
if os.Getenv("PAGER") != "" {
|
||||
return os.Getenv("PAGER")
|
||||
}
|
||||
|
||||
// Otherwise, search for `pager`, `less`, and `more` on the `$PATH`. If
|
||||
// none are found, return an empty pager.
|
||||
for _, pager := range []string{"pager", "less", "more"} {
|
||||
if path, err := exec.LookPath(pager); err != nil {
|
||||
return path
|
||||
}
|
||||
}
|
||||
|
||||
// default to no pager
|
||||
return ""
|
||||
}
|
|
@ -23,6 +23,7 @@ func Run(configs string, confpath string) error {
|
|||
// template the above paths into the default configs
|
||||
configs = strings.Replace(configs, "COMMUNITY_PATH", community, -1)
|
||||
configs = strings.Replace(configs, "PERSONAL_PATH", personal, -1)
|
||||
configs = strings.Replace(configs, "PAGER_PATH", config.Pager(), -1)
|
||||
|
||||
// prompt the user to download the community cheatsheets
|
||||
yes, err := Prompt(
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
module github.com/alecthomas/chroma
|
||||
|
||||
go 1.13
|
||||
|
||||
require (
|
||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||
github.com/dlclark/regexp2 v1.4.0
|
||||
github.com/stretchr/testify v1.7.0
|
||||
)
|
|
@ -1,14 +0,0 @@
|
|||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E=
|
||||
github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
|
||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
|
@ -1,3 +0,0 @@
|
|||
module github.com/dlclark/regexp2
|
||||
|
||||
go 1.13
|
|
@ -1,5 +0,0 @@
|
|||
module github.com/mattn/go-isatty
|
||||
|
||||
go 1.12
|
||||
|
||||
require golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
|
|
@ -1,2 +0,0 @@
|
|||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
@ -1 +0,0 @@
|
|||
module github.com/mitchellh/go-homedir
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include -m32
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/386/include -m32
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build 386 && linux
|
||||
// +build 386,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/386/include -m32 _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include -m64
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/amd64/include -m64
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build amd64 && linux
|
||||
// +build amd64,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/amd64/include -m64 _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/arm/include
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build arm && linux
|
||||
// +build arm,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/arm/include _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/arm64/include -fsigned-char
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build arm64 && linux
|
||||
// +build arm64,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/arm64/include -fsigned-char _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/loong64/include
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build loong64 && linux
|
||||
// +build loong64,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/loong64/include _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/mips/include
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build mips && linux
|
||||
// +build mips,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/mips/include _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/mips64/include
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build mips64 && linux
|
||||
// +build mips64,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/mips64/include _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/mips64le/include
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build mips64le && linux
|
||||
// +build mips64le,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/mips64le/include _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/mipsle/include
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build mipsle && linux
|
||||
// +build mipsle,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/mipsle/include _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/ppc/include
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build ppc && linux
|
||||
// +build ppc,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/ppc/include _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/ppc64/include
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build ppc64 && linux
|
||||
// +build ppc64,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/ppc64/include _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/ppc64le/include
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build ppc64le && linux
|
||||
// +build ppc64le,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/ppc64le/include _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/riscv64/include
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build riscv64 && linux
|
||||
// +build riscv64,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/riscv64/include _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include -fsigned-char
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/s390x/include -fsigned-char
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build s390x && linux
|
||||
// +build s390x,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/s390x/include -fsigned-char _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// mkerrors.sh -Wall -Werror -static -I/tmp/include
|
||||
// mkerrors.sh -Wall -Werror -static -I/tmp/sparc64/include
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build sparc64 && linux
|
||||
// +build sparc64,linux
|
||||
|
||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include _const.go
|
||||
// cgo -godefs -- -Wall -Werror -static -I/tmp/sparc64/include _const.go
|
||||
|
||||
package unix
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -m32 /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/386/include -m32 /tmp/386/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build 386 && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -m64 /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/amd64/include -m64 /tmp/amd64/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build amd64 && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/arm/include /tmp/arm/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build arm && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -fsigned-char /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/arm64/include -fsigned-char /tmp/arm64/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build arm64 && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/loong64/include /tmp/loong64/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build loong64 && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/mips/include /tmp/mips/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build mips && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/mips64/include /tmp/mips64/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build mips64 && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/mips64le/include /tmp/mips64le/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build mips64le && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/mipsle/include /tmp/mipsle/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build mipsle && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/ppc/include /tmp/ppc/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build ppc && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/ppc64/include /tmp/ppc64/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build ppc64 && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/ppc64le/include /tmp/ppc64le/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build ppc64le && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/riscv64/include /tmp/riscv64/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build riscv64 && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include -fsigned-char /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/s390x/include -fsigned-char /tmp/s390x/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build s390x && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h
|
||||
// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/sparc64/include /tmp/sparc64/include/asm/unistd.h
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build sparc64 && linux
|
||||
|
|
|
@ -945,6 +945,9 @@ type PerfEventAttr struct {
|
|||
Aux_watermark uint32
|
||||
Sample_max_stack uint16
|
||||
_ uint16
|
||||
Aux_sample_size uint32
|
||||
_ uint32
|
||||
Sig_data uint64
|
||||
}
|
||||
|
||||
type PerfEventMmapPage struct {
|
||||
|
@ -1463,6 +1466,11 @@ const (
|
|||
IFLA_ALT_IFNAME = 0x35
|
||||
IFLA_PERM_ADDRESS = 0x36
|
||||
IFLA_PROTO_DOWN_REASON = 0x37
|
||||
IFLA_PARENT_DEV_NAME = 0x38
|
||||
IFLA_PARENT_DEV_BUS_NAME = 0x39
|
||||
IFLA_GRO_MAX_SIZE = 0x3a
|
||||
IFLA_TSO_MAX_SIZE = 0x3b
|
||||
IFLA_TSO_MAX_SEGS = 0x3c
|
||||
IFLA_PROTO_DOWN_REASON_UNSPEC = 0x0
|
||||
IFLA_PROTO_DOWN_REASON_MASK = 0x1
|
||||
IFLA_PROTO_DOWN_REASON_VALUE = 0x2
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m32 linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/386/cgo -- -Wall -Werror -static -I/tmp/386/include -m32 linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build 386 && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -m64 linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/amd64/cgo -- -Wall -Werror -static -I/tmp/amd64/include -m64 linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build amd64 && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/arm/cgo -- -Wall -Werror -static -I/tmp/arm/include linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build arm && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/arm64/cgo -- -Wall -Werror -static -I/tmp/arm64/include -fsigned-char linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build arm64 && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/loong64/cgo -- -Wall -Werror -static -I/tmp/loong64/include linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build loong64 && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/mips/cgo -- -Wall -Werror -static -I/tmp/mips/include linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build mips && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/mips64/cgo -- -Wall -Werror -static -I/tmp/mips64/include linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build mips64 && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/mips64le/cgo -- -Wall -Werror -static -I/tmp/mips64le/include linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build mips64le && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/mipsle/cgo -- -Wall -Werror -static -I/tmp/mipsle/include linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build mipsle && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/ppc/cgo -- -Wall -Werror -static -I/tmp/ppc/include linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build ppc && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/ppc64/cgo -- -Wall -Werror -static -I/tmp/ppc64/include linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build ppc64 && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/ppc64le/cgo -- -Wall -Werror -static -I/tmp/ppc64le/include linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build ppc64le && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/riscv64/cgo -- -Wall -Werror -static -I/tmp/riscv64/include linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build riscv64 && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include -fsigned-char linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/s390x/cgo -- -Wall -Werror -static -I/tmp/s390x/include -fsigned-char linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build s390x && linux
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// cgo -godefs -- -Wall -Werror -static -I/tmp/include linux/types.go | go run mkpost.go
|
||||
// cgo -godefs -objdir=/tmp/sparc64/cgo -- -Wall -Werror -static -I/tmp/sparc64/include linux/types.go | go run mkpost.go
|
||||
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||
|
||||
//go:build sparc64 && linux
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
module gopkg.in/yaml.v2
|
||||
|
||||
go 1.15
|
||||
|
||||
require gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
|
|
@ -1,5 +1,5 @@
|
|||
# github.com/alecthomas/chroma v0.10.0
|
||||
## explicit
|
||||
## explicit; go 1.13
|
||||
github.com/alecthomas/chroma
|
||||
github.com/alecthomas/chroma/formatters
|
||||
github.com/alecthomas/chroma/formatters/html
|
||||
|
@ -38,7 +38,7 @@ github.com/alecthomas/chroma/styles
|
|||
## explicit
|
||||
github.com/davecgh/go-spew/spew
|
||||
# github.com/dlclark/regexp2 v1.7.0
|
||||
## explicit
|
||||
## explicit; go 1.13
|
||||
github.com/dlclark/regexp2
|
||||
github.com/dlclark/regexp2/syntax
|
||||
# github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
|
||||
|
@ -47,15 +47,15 @@ github.com/docopt/docopt-go
|
|||
# github.com/kr/text v0.2.0
|
||||
## explicit
|
||||
# github.com/mattn/go-isatty v0.0.14
|
||||
## explicit
|
||||
## explicit; go 1.12
|
||||
github.com/mattn/go-isatty
|
||||
# github.com/mitchellh/go-homedir v1.1.0
|
||||
## explicit
|
||||
github.com/mitchellh/go-homedir
|
||||
# github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e
|
||||
## explicit
|
||||
# golang.org/x/sys v0.0.0-20220731174439-a90be440212d
|
||||
## explicit
|
||||
## explicit; go 1.12
|
||||
# golang.org/x/sys v0.0.0-20220804214406-8e32c043e418
|
||||
## explicit; go 1.17
|
||||
golang.org/x/sys/internal/unsafeheader
|
||||
golang.org/x/sys/unix
|
||||
# gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f
|
||||
|
@ -64,5 +64,5 @@ golang.org/x/sys/unix
|
|||
## explicit
|
||||
gopkg.in/yaml.v1
|
||||
# gopkg.in/yaml.v2 v2.4.0
|
||||
## explicit
|
||||
## explicit; go 1.15
|
||||
gopkg.in/yaml.v2
|
||||
|
|
Loading…
Reference in New Issue