mirror of
https://github.com/cheat/cheat.git
synced 2025-09-01 09:38:29 +02:00
Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
b53a14b1a7 | |||
f1e8602369 | |||
ddbe710881 | |||
d598d96fce | |||
4fdec50487 | |||
9de866dfb6 | |||
eb99a070ce | |||
73f80bde48 | |||
8130b2f3bd | |||
f4e6c76e58 | |||
85f5ae8ec7 | |||
484b447391 |
75
.github/workflows/build.yml
vendored
75
.github/workflows/build.yml
vendored
@ -1,57 +1,46 @@
|
|||||||
|
---
|
||||||
name: Go
|
name: Go
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# TODO: is it possible to DRY out these jobs? Aside from `runs-on`, they are
|
# TODO: is it possible to DRY out these jobs? Aside from `runs-on`, they are
|
||||||
# identical.
|
# identical.
|
||||||
|
# See: https://github.com/actions/runner/issues/1182
|
||||||
build-linux:
|
build-linux:
|
||||||
runs-on: [ ubuntu-latest ]
|
runs-on: [ubuntu-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Go
|
||||||
- name: Set up Go
|
uses: actions/setup-go@v2
|
||||||
uses: actions/setup-go@v2
|
with:
|
||||||
with:
|
go-version: 1.19
|
||||||
go-version: 1.18
|
- name: Set up Revive (linter)
|
||||||
|
run: go get -u github.com/boyter/scc github.com/mgechev/revive
|
||||||
- name: Set up Revive (linter)
|
env:
|
||||||
run: go get -u github.com/boyter/scc github.com/mgechev/revive
|
GO111MODULE: "off"
|
||||||
env:
|
- name: Build
|
||||||
GO111MODULE: off
|
run: make build
|
||||||
|
- name: Test
|
||||||
|
run: make test
|
||||||
- name: Build
|
|
||||||
run: make build
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: make test
|
|
||||||
|
|
||||||
build-osx:
|
build-osx:
|
||||||
runs-on: [ macos-latest ]
|
runs-on: [macos-latest]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Go
|
||||||
- name: Set up Go
|
uses: actions/setup-go@v2
|
||||||
uses: actions/setup-go@v2
|
with:
|
||||||
with:
|
go-version: 1.19
|
||||||
go-version: 1.18
|
- name: Set up Revive (linter)
|
||||||
|
run: go get -u github.com/boyter/scc github.com/mgechev/revive
|
||||||
- name: Set up Revive (linter)
|
env:
|
||||||
run: go get -u github.com/boyter/scc github.com/mgechev/revive
|
GO111MODULE: "off"
|
||||||
env:
|
- name: Build
|
||||||
GO111MODULE: off
|
run: make build
|
||||||
|
- name: Test
|
||||||
- name: Build
|
run: make test
|
||||||
run: make build
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: make test
|
|
||||||
|
|
||||||
# TODO: windows
|
|
||||||
|
34
.github/workflows/codeql-analysis.yml
vendored
34
.github/workflows/codeql-analysis.yml
vendored
@ -1,12 +1,11 @@
|
|||||||
|
---
|
||||||
name: CodeQL
|
name: CodeQL
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [master]
|
||||||
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '45 23 * * 0'
|
- cron: '45 23 * * 0'
|
||||||
|
|
||||||
@ -14,23 +13,18 @@ jobs:
|
|||||||
analyze:
|
analyze:
|
||||||
name: Analyze
|
name: Analyze
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
language: [ 'go' ]
|
language: [go]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
- name: Initialize CodeQL
|
||||||
- name: Initialize CodeQL
|
uses: github/codeql-action/init@v1
|
||||||
uses: github/codeql-action/init@v1
|
with:
|
||||||
with:
|
languages: ${{ matrix.language }}
|
||||||
languages: ${{ matrix.language }}
|
- name: Autobuild
|
||||||
|
uses: github/codeql-action/autobuild@v1
|
||||||
- name: Autobuild
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/autobuild@v1
|
uses: github/codeql-action/analyze@v1
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
|
||||||
uses: github/codeql-action/analyze@v1
|
|
||||||
|
4
.github/workflows/homebrew.yml
vendored
4
.github/workflows/homebrew.yml
vendored
@ -1,3 +1,4 @@
|
|||||||
|
---
|
||||||
name: homebrew
|
name: homebrew
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@ -11,7 +12,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: mislav/bump-homebrew-formula-action@v1
|
- uses: mislav/bump-homebrew-formula-action@v1
|
||||||
with:
|
with:
|
||||||
# A PR will be sent to github.com/Homebrew/homebrew-core to update this formula:
|
# A PR will be sent to github.com/Homebrew/homebrew-core to update
|
||||||
|
# this formula:
|
||||||
formula-name: cheat
|
formula-name: cheat
|
||||||
env:
|
env:
|
||||||
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
|
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
|
||||||
|
@ -9,13 +9,13 @@ On Unix-like systems, you may simply paste the following snippet into your termi
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
cd /tmp \
|
cd /tmp \
|
||||||
&& wget https://github.com/cheat/cheat/releases/download/4.2.5/cheat-linux-amd64.gz \
|
&& wget https://github.com/cheat/cheat/releases/download/4.3.0/cheat-linux-amd64.gz \
|
||||||
&& gunzip cheat-linux-amd64.gz \
|
&& gunzip cheat-linux-amd64.gz \
|
||||||
&& chmod +x cheat-linux-amd64 \
|
&& chmod +x cheat-linux-amd64 \
|
||||||
&& sudo mv cheat-linux-amd64 /usr/local/bin/cheat
|
&& sudo mv cheat-linux-amd64 /usr/local/bin/cheat
|
||||||
```
|
```
|
||||||
|
|
||||||
You may need to need to change the version number (`4.2.5`) 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.
|
(`cheat-linux-amd64.gz`) depending on your platform.
|
||||||
|
|
||||||
See the [releases page][releases] for a list of supported platforms.
|
See the [releases page][releases] for a list of supported platforms.
|
||||||
|
11
cmd/cheat/cmd_conf.go
Normal file
11
cmd/cheat/cmd_conf.go
Normal file
@ -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)
|
||||||
|
}
|
@ -18,11 +18,7 @@ func cmdDirectories(opts map[string]interface{}, conf config.Config) {
|
|||||||
|
|
||||||
// generate sorted, columnized output
|
// generate sorted, columnized output
|
||||||
for _, path := range conf.Cheatpaths {
|
for _, path := range conf.Cheatpaths {
|
||||||
fmt.Fprintln(w, fmt.Sprintf(
|
fmt.Fprintf(w, "%s:\t%s\n", path.Name, path.Path)
|
||||||
"%s:\t%s",
|
|
||||||
path.Name,
|
|
||||||
path.Path,
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// write columnized output to stdout
|
// write columnized output to stdout
|
||||||
|
@ -20,7 +20,7 @@ func cmdEdit(opts map[string]interface{}, conf config.Config) {
|
|||||||
// load the cheatsheets
|
// load the cheatsheets
|
||||||
cheatsheets, err := sheets.Load(conf.Cheatpaths)
|
cheatsheets, err := sheets.Load(conf.Cheatpaths)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, fmt.Sprintf("failed to list cheatsheets: %v", err))
|
fmt.Fprintf(os.Stderr, "failed to list cheatsheets: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ func cmdList(opts map[string]interface{}, conf config.Config) {
|
|||||||
// load the cheatsheets
|
// load the cheatsheets
|
||||||
cheatsheets, err := sheets.Load(conf.Cheatpaths)
|
cheatsheets, err := sheets.Load(conf.Cheatpaths)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, fmt.Sprintf("failed to list cheatsheets: %v", err))
|
fmt.Fprintf(os.Stderr, "failed to list cheatsheets: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,10 +63,7 @@ func cmdList(opts map[string]interface{}, conf config.Config) {
|
|||||||
// compile the regex
|
// compile the regex
|
||||||
reg, err := regexp.Compile(pattern)
|
reg, err := regexp.Compile(pattern)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(
|
fmt.Fprintf(os.Stderr, "failed to compile regexp: %s, %v\n", pattern, err)
|
||||||
os.Stderr,
|
|
||||||
fmt.Sprintf("failed to compile regexp: %s, %v", pattern, err),
|
|
||||||
)
|
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -95,12 +92,7 @@ func cmdList(opts map[string]interface{}, conf config.Config) {
|
|||||||
|
|
||||||
// generate sorted, columnized output
|
// generate sorted, columnized output
|
||||||
for _, sheet := range flattened {
|
for _, sheet := range flattened {
|
||||||
fmt.Fprintln(w, fmt.Sprintf(
|
fmt.Fprintf(w, "%s\t%s\t%s\n", sheet.Title, sheet.Path, strings.Join(sheet.Tags, ","))
|
||||||
"%s\t%s\t%s",
|
|
||||||
sheet.Title,
|
|
||||||
sheet.Path,
|
|
||||||
strings.Join(sheet.Tags, ","),
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// write columnized output to stdout
|
// write columnized output to stdout
|
||||||
|
@ -17,7 +17,7 @@ func cmdRemove(opts map[string]interface{}, conf config.Config) {
|
|||||||
// load the cheatsheets
|
// load the cheatsheets
|
||||||
cheatsheets, err := sheets.Load(conf.Cheatpaths)
|
cheatsheets, err := sheets.Load(conf.Cheatpaths)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, fmt.Sprintf("failed to list cheatsheets: %v", err))
|
fmt.Fprintf(os.Stderr, "failed to list cheatsheets: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,19 +37,19 @@ func cmdRemove(opts map[string]interface{}, conf config.Config) {
|
|||||||
// fail early if the requested cheatsheet does not exist
|
// fail early if the requested cheatsheet does not exist
|
||||||
sheet, ok := consolidated[cheatsheet]
|
sheet, ok := consolidated[cheatsheet]
|
||||||
if !ok {
|
if !ok {
|
||||||
fmt.Fprintln(os.Stderr, fmt.Sprintf("No cheatsheet found for '%s'.\n", cheatsheet))
|
fmt.Fprintf(os.Stderr, "No cheatsheet found for '%s'.\n", cheatsheet)
|
||||||
os.Exit(2)
|
os.Exit(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
// fail early if the sheet is read-only
|
// fail early if the sheet is read-only
|
||||||
if sheet.ReadOnly {
|
if sheet.ReadOnly {
|
||||||
fmt.Fprintln(os.Stderr, fmt.Sprintf("cheatsheet '%s' is read-only.", cheatsheet))
|
fmt.Fprintf(os.Stderr, "cheatsheet '%s' is read-only.\n", cheatsheet)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// otherwise, attempt to delete the sheet
|
// otherwise, attempt to delete the sheet
|
||||||
if err := os.Remove(sheet.Path); err != nil {
|
if err := os.Remove(sheet.Path); err != nil {
|
||||||
fmt.Fprintln(os.Stderr, fmt.Sprintf("failed to delete sheet: %s, %v", sheet.Title, err))
|
fmt.Fprintf(os.Stderr, "failed to delete sheet: %s, %v\n", sheet.Title, err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,7 @@ func cmdSearch(opts map[string]interface{}, conf config.Config) {
|
|||||||
// load the cheatsheets
|
// load the cheatsheets
|
||||||
cheatsheets, err := sheets.Load(conf.Cheatpaths)
|
cheatsheets, err := sheets.Load(conf.Cheatpaths)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, fmt.Sprintf("failed to list cheatsheets: %v", err))
|
fmt.Fprintf(os.Stderr, "failed to list cheatsheets: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,13 +55,13 @@ func cmdSearch(opts map[string]interface{}, conf config.Config) {
|
|||||||
// compile the regex
|
// compile the regex
|
||||||
reg, err := regexp.Compile(pattern)
|
reg, err := regexp.Compile(pattern)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, fmt.Sprintf("failed to compile regexp: %s, %v", pattern, err))
|
fmt.Fprintf(os.Stderr, "failed to compile regexp: %s, %v\n", pattern, err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// `Search` will return text entries that match the search terms. We're
|
// `Search` will return text entries that match the search terms.
|
||||||
// using it here to overwrite the prior cheatsheet Text, filtering it to
|
// We're using it here to overwrite the prior cheatsheet Text,
|
||||||
// only what is relevant
|
// filtering it to only what is relevant.
|
||||||
sheet.Text = sheet.Search(reg)
|
sheet.Text = sheet.Search(reg)
|
||||||
|
|
||||||
// if the sheet did not match the search, ignore it and move on
|
// if the sheet did not match the search, ignore it and move on
|
||||||
@ -74,14 +74,16 @@ func cmdSearch(opts map[string]interface{}, conf config.Config) {
|
|||||||
sheet.Colorize(conf)
|
sheet.Colorize(conf)
|
||||||
}
|
}
|
||||||
|
|
||||||
// display the cheatsheet title and path
|
// display the cheatsheet body
|
||||||
out += fmt.Sprintf("%s %s\n",
|
out += fmt.Sprintf(
|
||||||
display.Underline(sheet.Title),
|
"%s %s\n%s\n",
|
||||||
|
// append the cheatsheet title
|
||||||
|
sheet.Title,
|
||||||
|
// append the cheatsheet path
|
||||||
display.Faint(fmt.Sprintf("(%s)", sheet.CheatPath), conf),
|
display.Faint(fmt.Sprintf("(%s)", sheet.CheatPath), conf),
|
||||||
|
// indent each line of content
|
||||||
|
display.Indent(sheet.Text),
|
||||||
)
|
)
|
||||||
|
|
||||||
// indent each line of content
|
|
||||||
out += display.Indent(sheet.Text) + "\n"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,7 +91,7 @@ func cmdSearch(opts map[string]interface{}, conf config.Config) {
|
|||||||
out = strings.TrimSpace(out)
|
out = strings.TrimSpace(out)
|
||||||
|
|
||||||
// display the output
|
// display the output
|
||||||
// NB: resist the temptation to call `display.Display` multiple times in
|
// NB: resist the temptation to call `display.Write` multiple times in the
|
||||||
// the loop above. That will not play nicely with the paginator.
|
// loop above. That will not play nicely with the paginator.
|
||||||
display.Write(out, conf)
|
display.Write(out, conf)
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,7 @@ func cmdTags(opts map[string]interface{}, conf config.Config) {
|
|||||||
// load the cheatsheets
|
// load the cheatsheets
|
||||||
cheatsheets, err := sheets.Load(conf.Cheatpaths)
|
cheatsheets, err := sheets.Load(conf.Cheatpaths)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, fmt.Sprintf("failed to list cheatsheets: %v", err))
|
fmt.Fprintf(os.Stderr, "failed to list cheatsheets: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ func cmdView(opts map[string]interface{}, conf config.Config) {
|
|||||||
// load the cheatsheets
|
// load the cheatsheets
|
||||||
cheatsheets, err := sheets.Load(conf.Cheatpaths)
|
cheatsheets, err := sheets.Load(conf.Cheatpaths)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Fprintln(os.Stderr, fmt.Sprintf("failed to list cheatsheets: %v", err))
|
fmt.Fprintf(os.Stderr, "failed to list cheatsheets: %v\n", err)
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,7 +41,7 @@ func cmdView(opts map[string]interface{}, conf config.Config) {
|
|||||||
|
|
||||||
// identify the matching cheatsheet
|
// identify the matching cheatsheet
|
||||||
out += fmt.Sprintf("%s %s\n",
|
out += fmt.Sprintf("%s %s\n",
|
||||||
display.Underline(sheet.Title),
|
sheet.Title,
|
||||||
display.Faint(fmt.Sprintf("(%s)", sheet.CheatPath), conf),
|
display.Faint(fmt.Sprintf("(%s)", sheet.CheatPath), conf),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ Options:
|
|||||||
-T --tags List all tags in use
|
-T --tags List all tags in use
|
||||||
-v --version Print the version number
|
-v --version Print the version number
|
||||||
--rm=<cheatsheet> Remove (delete) <cheatsheet>
|
--rm=<cheatsheet> Remove (delete) <cheatsheet>
|
||||||
|
--conf Display the config file path
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
@ -53,3 +54,6 @@ Examples:
|
|||||||
|
|
||||||
To remove (delete) the foo/bar cheatsheet:
|
To remove (delete) the foo/bar cheatsheet:
|
||||||
cheat --rm foo/bar
|
cheat --rm foo/bar
|
||||||
|
|
||||||
|
To view the configuration file path:
|
||||||
|
cheat --conf
|
||||||
|
@ -16,7 +16,7 @@ import (
|
|||||||
"github.com/cheat/cheat/internal/installer"
|
"github.com/cheat/cheat/internal/installer"
|
||||||
)
|
)
|
||||||
|
|
||||||
const version = "4.2.6"
|
const version = "4.3.0"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
|
||||||
@ -120,6 +120,9 @@ func main() {
|
|||||||
var cmd func(map[string]interface{}, config.Config)
|
var cmd func(map[string]interface{}, config.Config)
|
||||||
|
|
||||||
switch {
|
switch {
|
||||||
|
case opts["--conf"].(bool):
|
||||||
|
cmd = cmdConf
|
||||||
|
|
||||||
case opts["--directories"].(bool):
|
case opts["--directories"].(bool):
|
||||||
cmd = cmdDirectories
|
cmd = cmdDirectories
|
||||||
|
|
||||||
|
@ -24,7 +24,9 @@ colorize: false
|
|||||||
formatter: terminal
|
formatter: terminal
|
||||||
|
|
||||||
# Through which pager should output be piped?
|
# 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
|
# The paths at which cheatsheets are available. Tags associated with a cheatpath
|
||||||
# are automatically attached to all cheatsheets residing on that path.
|
# are automatically attached to all cheatsheets residing on that path.
|
||||||
|
@ -24,6 +24,7 @@ Options:
|
|||||||
-T --tags List all tags in use
|
-T --tags List all tags in use
|
||||||
-v --version Print the version number
|
-v --version Print the version number
|
||||||
--rm=<cheatsheet> Remove (delete) <cheatsheet>
|
--rm=<cheatsheet> Remove (delete) <cheatsheet>
|
||||||
|
--conf Display the config file path
|
||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
|
|
||||||
@ -62,5 +63,8 @@ Examples:
|
|||||||
|
|
||||||
To remove (delete) the foo/bar cheatsheet:
|
To remove (delete) the foo/bar cheatsheet:
|
||||||
cheat --rm foo/bar
|
cheat --rm foo/bar
|
||||||
|
|
||||||
|
To view the configuration file path:
|
||||||
|
cheat --conf
|
||||||
`)
|
`)
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,9 @@ colorize: false
|
|||||||
formatter: terminal
|
formatter: terminal
|
||||||
|
|
||||||
# Through which pager should output be piped?
|
# 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
|
# The paths at which cheatsheets are available. Tags associated with a cheatpath
|
||||||
# are automatically attached to all cheatsheets residing on that path.
|
# 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
|
module github.com/cheat/cheat
|
||||||
|
|
||||||
go 1.14
|
go 1.19
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/alecthomas/chroma v0.10.0
|
github.com/alecthomas/chroma v0.10.0
|
||||||
github.com/davecgh/go-spew v1.1.1
|
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/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/mattn/go-isatty v0.0.14
|
||||||
github.com/mitchellh/go-homedir v1.1.0
|
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.v1 v1.0.0-20140924161607-9f9df34309c0
|
||||||
gopkg.in/yaml.v2 v2.4.0
|
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 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
||||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
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-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-20220804214406-8e32c043e418 h1:9vYwv7OjYaky/tlAeD7C4oC9EsPTlaFl1H2jS++V+ME=
|
||||||
golang.org/x/sys v0.0.0-20220731174439-a90be440212d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
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 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 h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU=
|
||||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
|
@ -46,7 +46,7 @@ func TestFilterFailure(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// filter the paths
|
// filter the paths
|
||||||
paths, err := Filter(paths, "qux")
|
_, err := Filter(paths, "qux")
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Errorf("failed to return an error on non-existent cheatpath")
|
t.Errorf("failed to return an error on non-existent cheatpath")
|
||||||
}
|
}
|
||||||
|
@ -11,12 +11,10 @@ func Writeable(cheatpaths []Cheatpath) (Cheatpath, error) {
|
|||||||
// NB: we're going backwards because we assume that the most "local"
|
// NB: we're going backwards because we assume that the most "local"
|
||||||
// cheatpath will be specified last in the configs
|
// cheatpath will be specified last in the configs
|
||||||
for i := len(cheatpaths) - 1; i >= 0; i-- {
|
for i := len(cheatpaths) - 1; i >= 0; i-- {
|
||||||
|
|
||||||
// if the cheatpath is not read-only, it is writeable, and thus returned
|
// if the cheatpath is not read-only, it is writeable, and thus returned
|
||||||
if cheatpaths[i].ReadOnly == false {
|
if !cheatpaths[i].ReadOnly {
|
||||||
return cheatpaths[i], nil
|
return cheatpaths[i], nil
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// otherwise, return an error
|
// otherwise, return an error
|
||||||
|
@ -2,11 +2,8 @@ package config
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"runtime"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
cp "github.com/cheat/cheat/internal/cheatpath"
|
cp "github.com/cheat/cheat/internal/cheatpath"
|
||||||
@ -23,13 +20,14 @@ type Config struct {
|
|||||||
Style string `yaml:"style"`
|
Style string `yaml:"style"`
|
||||||
Formatter string `yaml:"formatter"`
|
Formatter string `yaml:"formatter"`
|
||||||
Pager string `yaml:"pager"`
|
Pager string `yaml:"pager"`
|
||||||
|
Path string
|
||||||
}
|
}
|
||||||
|
|
||||||
// New returns a new Config struct
|
// New returns a new Config struct
|
||||||
func New(opts map[string]interface{}, confPath string, resolve bool) (Config, error) {
|
func New(opts map[string]interface{}, confPath string, resolve bool) (Config, error) {
|
||||||
|
|
||||||
// read the config file
|
// read the config file
|
||||||
buf, err := ioutil.ReadFile(confPath)
|
buf, err := os.ReadFile(confPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return Config{}, fmt.Errorf("could not read config file: %v", err)
|
return Config{}, fmt.Errorf("could not read config file: %v", err)
|
||||||
}
|
}
|
||||||
@ -37,6 +35,9 @@ func New(opts map[string]interface{}, confPath string, resolve bool) (Config, er
|
|||||||
// initialize a config object
|
// initialize a config object
|
||||||
conf := Config{}
|
conf := Config{}
|
||||||
|
|
||||||
|
// store the config path
|
||||||
|
conf.Path = confPath
|
||||||
|
|
||||||
// unmarshal the yaml
|
// unmarshal the yaml
|
||||||
err = yaml.UnmarshalStrict(buf, &conf)
|
err = yaml.UnmarshalStrict(buf, &conf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -94,28 +95,11 @@ func New(opts map[string]interface{}, confPath string, resolve bool) (Config, er
|
|||||||
conf.Cheatpaths[i].Path = expanded
|
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 conf.Editor == "" {
|
||||||
if os.Getenv("VISUAL") != "" {
|
if conf.Editor, err = Editor(); err != nil {
|
||||||
conf.Editor = os.Getenv("VISUAL")
|
return Config{}, err
|
||||||
} 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")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,39 +113,8 @@ func New(opts map[string]interface{}, confPath string, resolve bool) (Config, er
|
|||||||
conf.Formatter = "terminal"
|
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)
|
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
|
return conf, nil
|
||||||
}
|
}
|
||||||
|
30
internal/config/editor.go
Normal file
30
internal/config/editor.go
Normal file
@ -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")
|
||||||
|
}
|
@ -2,7 +2,6 @@ package config
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
)
|
)
|
||||||
@ -16,7 +15,7 @@ func Init(confpath string, configs string) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// write the config file
|
// write the config file
|
||||||
if err := ioutil.WriteFile(confpath, []byte(configs), 0644); err != nil {
|
if err := os.WriteFile(confpath, []byte(configs), 0644); err != nil {
|
||||||
return fmt.Errorf("failed to create file: %v", err)
|
return fmt.Errorf("failed to create file: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
@ -10,7 +9,7 @@ import (
|
|||||||
func TestInit(t *testing.T) {
|
func TestInit(t *testing.T) {
|
||||||
|
|
||||||
// initialize a temporary config file
|
// initialize a temporary config file
|
||||||
confFile, err := ioutil.TempFile("", "cheat-test")
|
confFile, err := os.CreateTemp("", "cheat-test")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("failed to create temp file: %v", err)
|
t.Errorf("failed to create temp file: %v", err)
|
||||||
}
|
}
|
||||||
@ -25,7 +24,7 @@ func TestInit(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// read back the config file contents
|
// read back the config file contents
|
||||||
bytes, err := ioutil.ReadFile(confFile.Name())
|
bytes, err := os.ReadFile(confFile.Name())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("failed to read config file: %v", err)
|
t.Errorf("failed to read config file: %v", err)
|
||||||
}
|
}
|
||||||
|
26
internal/config/pager.go
Normal file
26
internal/config/pager.go
Normal file
@ -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 ""
|
||||||
|
}
|
@ -1,7 +1,6 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
@ -24,7 +23,7 @@ func TestPathConfigNotExists(t *testing.T) {
|
|||||||
func TestPathConfigExists(t *testing.T) {
|
func TestPathConfigExists(t *testing.T) {
|
||||||
|
|
||||||
// initialize a temporary config file
|
// initialize a temporary config file
|
||||||
confFile, err := ioutil.TempFile("", "cheat-test")
|
confFile, err := os.CreateTemp("", "cheat-test")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("failed to create temp file: %v", err)
|
t.Errorf("failed to create temp file: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ import (
|
|||||||
func Faint(str string, conf config.Config) string {
|
func Faint(str string, conf config.Config) string {
|
||||||
// make `str` faint only if colorization has been requested
|
// make `str` faint only if colorization has been requested
|
||||||
if conf.Colorize {
|
if conf.Colorize {
|
||||||
return fmt.Sprintf(fmt.Sprintf("\033[2m%s\033[0m", str))
|
return fmt.Sprintf("\033[2m%s\033[0m", str)
|
||||||
}
|
}
|
||||||
|
|
||||||
// otherwise, return the string unmodified
|
// otherwise, return the string unmodified
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
package display
|
|
||||||
|
|
||||||
import "fmt"
|
|
||||||
|
|
||||||
// Underline returns an underlined string
|
|
||||||
func Underline(str string) string {
|
|
||||||
return fmt.Sprintf(fmt.Sprintf("\033[4m%s\033[0m", str))
|
|
||||||
}
|
|
@ -1,14 +0,0 @@
|
|||||||
package display
|
|
||||||
|
|
||||||
import (
|
|
||||||
"testing"
|
|
||||||
)
|
|
||||||
|
|
||||||
// TestUnderline asserts that Underline applies underline formatting
|
|
||||||
func TestUnderline(t *testing.T) {
|
|
||||||
want := "\033[4mfoo\033[0m"
|
|
||||||
got := Underline("foo")
|
|
||||||
if want != got {
|
|
||||||
t.Errorf("failed to underline: want: %s, got: %s", want, got)
|
|
||||||
}
|
|
||||||
}
|
|
@ -23,15 +23,14 @@ func Write(out string, conf config.Config) {
|
|||||||
pager := parts[0]
|
pager := parts[0]
|
||||||
args := parts[1:]
|
args := parts[1:]
|
||||||
|
|
||||||
// run the pager
|
// configure the pager
|
||||||
cmd := exec.Command(pager, args...)
|
cmd := exec.Command(pager, args...)
|
||||||
cmd.Stdin = strings.NewReader(out)
|
cmd.Stdin = strings.NewReader(out)
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
|
|
||||||
// handle errors
|
// run the pager and handle errors
|
||||||
err := cmd.Run()
|
if err := cmd.Run(); err != nil {
|
||||||
if err != nil {
|
fmt.Fprintf(os.Stderr, "failed to write to pager: %v\n", err)
|
||||||
fmt.Fprintln(os.Stderr, fmt.Sprintf("failed to write to pager: %v", err))
|
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ func Prompt(prompt string, def bool) (bool, error) {
|
|||||||
reader := bufio.NewReader(os.Stdin)
|
reader := bufio.NewReader(os.Stdin)
|
||||||
|
|
||||||
// display the prompt
|
// display the prompt
|
||||||
fmt.Print(fmt.Sprintf("%s: ", prompt))
|
fmt.Printf("%s: ", prompt)
|
||||||
|
|
||||||
// read the answer
|
// read the answer
|
||||||
ans, err := reader.ReadString('\n')
|
ans, err := reader.ReadString('\n')
|
||||||
|
@ -23,6 +23,7 @@ func Run(configs string, confpath string) error {
|
|||||||
// template the above paths into the default configs
|
// template the above paths into the default configs
|
||||||
configs = strings.Replace(configs, "COMMUNITY_PATH", community, -1)
|
configs = strings.Replace(configs, "COMMUNITY_PATH", community, -1)
|
||||||
configs = strings.Replace(configs, "PERSONAL_PATH", personal, -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
|
// prompt the user to download the community cheatsheets
|
||||||
yes, err := Prompt(
|
yes, err := Prompt(
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package sheet
|
package sheet
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
"testing"
|
"testing"
|
||||||
@ -13,7 +12,7 @@ func TestCopyFlat(t *testing.T) {
|
|||||||
|
|
||||||
// mock a cheatsheet file
|
// mock a cheatsheet file
|
||||||
text := "this is the cheatsheet text"
|
text := "this is the cheatsheet text"
|
||||||
src, err := ioutil.TempFile("", "foo-src")
|
src, err := os.CreateTemp("", "foo-src")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("failed to mock cheatsheet: %v", err)
|
t.Errorf("failed to mock cheatsheet: %v", err)
|
||||||
}
|
}
|
||||||
@ -41,7 +40,7 @@ func TestCopyFlat(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// assert that the destination file contains the correct text
|
// assert that the destination file contains the correct text
|
||||||
got, err := ioutil.ReadFile(outpath)
|
got, err := os.ReadFile(outpath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("failed to read destination file: %v", err)
|
t.Errorf("failed to read destination file: %v", err)
|
||||||
}
|
}
|
||||||
@ -60,7 +59,7 @@ func TestCopyDeep(t *testing.T) {
|
|||||||
|
|
||||||
// mock a cheatsheet file
|
// mock a cheatsheet file
|
||||||
text := "this is the cheatsheet text"
|
text := "this is the cheatsheet text"
|
||||||
src, err := ioutil.TempFile("", "foo-src")
|
src, err := os.CreateTemp("", "foo-src")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("failed to mock cheatsheet: %v", err)
|
t.Errorf("failed to mock cheatsheet: %v", err)
|
||||||
}
|
}
|
||||||
@ -94,7 +93,7 @@ func TestCopyDeep(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// assert that the destination file contains the correct text
|
// assert that the destination file contains the correct text
|
||||||
got, err := ioutil.ReadFile(outpath)
|
got, err := os.ReadFile(outpath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Errorf("failed to read destination file: %v", err)
|
t.Errorf("failed to read destination file: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@ package sheet
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
"os"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/cheat/cheat/internal/frontmatter"
|
"github.com/cheat/cheat/internal/frontmatter"
|
||||||
@ -29,7 +29,7 @@ func New(
|
|||||||
) (Sheet, error) {
|
) (Sheet, error) {
|
||||||
|
|
||||||
// read the cheatsheet file
|
// read the cheatsheet file
|
||||||
markdown, err := ioutil.ReadFile(path)
|
markdown, err := os.ReadFile(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return Sheet{}, fmt.Errorf("failed to read file: %s, %v", path, err)
|
return Sheet{}, fmt.Errorf("failed to read file: %s, %v", path, err)
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ package sheets
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"io/fs"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"strings"
|
"strings"
|
||||||
@ -55,7 +56,11 @@ func Load(cheatpaths []cp.Cheatpath) ([]map[string]sheet.Sheet, error) {
|
|||||||
// contained within hidden directories in the middle of a path, though
|
// contained within hidden directories in the middle of a path, though
|
||||||
// that should not realistically occur.
|
// that should not realistically occur.
|
||||||
if strings.HasPrefix(title, ".") || strings.HasPrefix(info.Name(), ".") {
|
if strings.HasPrefix(title, ".") || strings.HasPrefix(info.Name(), ".") {
|
||||||
return nil
|
// Do not walk hidden directories. This is important,
|
||||||
|
// because it's common for cheatsheets to be stored in
|
||||||
|
// version-control, and a `.git` directory can easily
|
||||||
|
// contain thousands of files.
|
||||||
|
return fs.SkipDir
|
||||||
}
|
}
|
||||||
|
|
||||||
// parse the cheatsheet file into a `sheet` struct
|
// parse the cheatsheet file into a `sheet` struct
|
||||||
|
9
vendor/github.com/alecthomas/chroma/go.mod
generated
vendored
9
vendor/github.com/alecthomas/chroma/go.mod
generated
vendored
@ -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
|
|
||||||
)
|
|
14
vendor/github.com/alecthomas/chroma/go.sum
generated
vendored
14
vendor/github.com/alecthomas/chroma/go.sum
generated
vendored
@ -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=
|
|
3
vendor/github.com/dlclark/regexp2/go.mod
generated
vendored
3
vendor/github.com/dlclark/regexp2/go.mod
generated
vendored
@ -1,3 +0,0 @@
|
|||||||
module github.com/dlclark/regexp2
|
|
||||||
|
|
||||||
go 1.13
|
|
5
vendor/github.com/mattn/go-isatty/go.mod
generated
vendored
5
vendor/github.com/mattn/go-isatty/go.mod
generated
vendored
@ -1,5 +0,0 @@
|
|||||||
module github.com/mattn/go-isatty
|
|
||||||
|
|
||||||
go 1.12
|
|
||||||
|
|
||||||
require golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c
|
|
2
vendor/github.com/mattn/go-isatty/go.sum
generated
vendored
2
vendor/github.com/mattn/go-isatty/go.sum
generated
vendored
@ -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
vendor/github.com/mitchellh/go-homedir/go.mod
generated
vendored
1
vendor/github.com/mitchellh/go-homedir/go.mod
generated
vendored
@ -1 +0,0 @@
|
|||||||
module github.com/mitchellh/go-homedir
|
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_386.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build 386 && linux
|
//go:build 386 && linux
|
||||||
// +build 386,linux
|
// +build 386,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build amd64 && linux
|
//go:build amd64 && linux
|
||||||
// +build amd64,linux
|
// +build amd64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build arm && linux
|
//go:build arm && linux
|
||||||
// +build arm,linux
|
// +build arm,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build arm64 && linux
|
//go:build arm64 && linux
|
||||||
// +build arm64,linux
|
// +build arm64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build loong64 && linux
|
//go:build loong64 && linux
|
||||||
// +build loong64,linux
|
// +build loong64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build mips && linux
|
//go:build mips && linux
|
||||||
// +build mips,linux
|
// +build mips,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build mips64 && linux
|
//go:build mips64 && linux
|
||||||
// +build mips64,linux
|
// +build mips64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build mips64le && linux
|
//go:build mips64le && linux
|
||||||
// +build mips64le,linux
|
// +build mips64le,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build mipsle && linux
|
//go:build mipsle && linux
|
||||||
// +build mipsle,linux
|
// +build mipsle,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build ppc && linux
|
//go:build ppc && linux
|
||||||
// +build ppc,linux
|
// +build ppc,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build ppc64 && linux
|
//go:build ppc64 && linux
|
||||||
// +build ppc64,linux
|
// +build ppc64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build ppc64le && linux
|
//go:build ppc64le && linux
|
||||||
// +build ppc64le,linux
|
// +build ppc64le,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build riscv64 && linux
|
//go:build riscv64 && linux
|
||||||
// +build riscv64,linux
|
// +build riscv64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build s390x && linux
|
//go:build s390x && linux
|
||||||
// +build s390x,linux
|
// +build s390x,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
4
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
4
vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build sparc64 && linux
|
//go:build sparc64 && linux
|
||||||
// +build sparc64,linux
|
// +build sparc64,linux
|
||||||
|
|
||||||
// Code generated by cmd/cgo -godefs; DO NOT EDIT.
|
// 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
|
package unix
|
||||||
|
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_386.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build 386 && linux
|
//go:build 386 && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build amd64 && linux
|
//go:build amd64 && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build arm && linux
|
//go:build arm && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build arm64 && linux
|
//go:build arm64 && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build loong64 && linux
|
//go:build loong64 && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build mips && linux
|
//go:build mips && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build mips64 && linux
|
//go:build mips64 && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build mips64le && linux
|
//go:build mips64le && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build mipsle && linux
|
//go:build mipsle && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build ppc && linux
|
//go:build ppc && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build ppc64 && linux
|
//go:build ppc64 && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build ppc64le && linux
|
//go:build ppc64le && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build riscv64 && linux
|
//go:build riscv64 && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build s390x && linux
|
//go:build s390x && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build sparc64 && linux
|
//go:build sparc64 && linux
|
||||||
|
8
vendor/golang.org/x/sys/unix/ztypes_linux.go
generated
vendored
8
vendor/golang.org/x/sys/unix/ztypes_linux.go
generated
vendored
@ -945,6 +945,9 @@ type PerfEventAttr struct {
|
|||||||
Aux_watermark uint32
|
Aux_watermark uint32
|
||||||
Sample_max_stack uint16
|
Sample_max_stack uint16
|
||||||
_ uint16
|
_ uint16
|
||||||
|
Aux_sample_size uint32
|
||||||
|
_ uint32
|
||||||
|
Sig_data uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type PerfEventMmapPage struct {
|
type PerfEventMmapPage struct {
|
||||||
@ -1463,6 +1466,11 @@ const (
|
|||||||
IFLA_ALT_IFNAME = 0x35
|
IFLA_ALT_IFNAME = 0x35
|
||||||
IFLA_PERM_ADDRESS = 0x36
|
IFLA_PERM_ADDRESS = 0x36
|
||||||
IFLA_PROTO_DOWN_REASON = 0x37
|
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_UNSPEC = 0x0
|
||||||
IFLA_PROTO_DOWN_REASON_MASK = 0x1
|
IFLA_PROTO_DOWN_REASON_MASK = 0x1
|
||||||
IFLA_PROTO_DOWN_REASON_VALUE = 0x2
|
IFLA_PROTO_DOWN_REASON_VALUE = 0x2
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_386.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_386.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build 386 && linux
|
//go:build 386 && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build amd64 && linux
|
//go:build amd64 && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build arm && linux
|
//go:build arm && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build arm64 && linux
|
//go:build arm64 && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build loong64 && linux
|
//go:build loong64 && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build mips && linux
|
//go:build mips && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build mips64 && linux
|
//go:build mips64 && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build mips64le && linux
|
//go:build mips64le && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build mipsle && linux
|
//go:build mipsle && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build ppc && linux
|
//go:build ppc && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build ppc64 && linux
|
//go:build ppc64 && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build ppc64le && linux
|
//go:build ppc64le && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build riscv64 && linux
|
//go:build riscv64 && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build s390x && linux
|
//go:build s390x && linux
|
||||||
|
2
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
generated
vendored
2
vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
generated
vendored
@ -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.
|
// Code generated by the command above; see README.md. DO NOT EDIT.
|
||||||
|
|
||||||
//go:build sparc64 && linux
|
//go:build sparc64 && linux
|
||||||
|
5
vendor/gopkg.in/yaml.v2/go.mod
generated
vendored
5
vendor/gopkg.in/yaml.v2/go.mod
generated
vendored
@ -1,5 +0,0 @@
|
|||||||
module gopkg.in/yaml.v2
|
|
||||||
|
|
||||||
go 1.15
|
|
||||||
|
|
||||||
require gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405
|
|
14
vendor/modules.txt
vendored
14
vendor/modules.txt
vendored
@ -1,5 +1,5 @@
|
|||||||
# github.com/alecthomas/chroma v0.10.0
|
# github.com/alecthomas/chroma v0.10.0
|
||||||
## explicit
|
## explicit; go 1.13
|
||||||
github.com/alecthomas/chroma
|
github.com/alecthomas/chroma
|
||||||
github.com/alecthomas/chroma/formatters
|
github.com/alecthomas/chroma/formatters
|
||||||
github.com/alecthomas/chroma/formatters/html
|
github.com/alecthomas/chroma/formatters/html
|
||||||
@ -38,7 +38,7 @@ github.com/alecthomas/chroma/styles
|
|||||||
## explicit
|
## explicit
|
||||||
github.com/davecgh/go-spew/spew
|
github.com/davecgh/go-spew/spew
|
||||||
# github.com/dlclark/regexp2 v1.7.0
|
# github.com/dlclark/regexp2 v1.7.0
|
||||||
## explicit
|
## explicit; go 1.13
|
||||||
github.com/dlclark/regexp2
|
github.com/dlclark/regexp2
|
||||||
github.com/dlclark/regexp2/syntax
|
github.com/dlclark/regexp2/syntax
|
||||||
# github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815
|
# 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
|
# github.com/kr/text v0.2.0
|
||||||
## explicit
|
## explicit
|
||||||
# github.com/mattn/go-isatty v0.0.14
|
# github.com/mattn/go-isatty v0.0.14
|
||||||
## explicit
|
## explicit; go 1.12
|
||||||
github.com/mattn/go-isatty
|
github.com/mattn/go-isatty
|
||||||
# github.com/mitchellh/go-homedir v1.1.0
|
# github.com/mitchellh/go-homedir v1.1.0
|
||||||
## explicit
|
## explicit
|
||||||
github.com/mitchellh/go-homedir
|
github.com/mitchellh/go-homedir
|
||||||
# github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e
|
# github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e
|
||||||
## explicit
|
## explicit; go 1.12
|
||||||
# golang.org/x/sys v0.0.0-20220731174439-a90be440212d
|
# golang.org/x/sys v0.0.0-20220804214406-8e32c043e418
|
||||||
## explicit
|
## explicit; go 1.17
|
||||||
golang.org/x/sys/internal/unsafeheader
|
golang.org/x/sys/internal/unsafeheader
|
||||||
golang.org/x/sys/unix
|
golang.org/x/sys/unix
|
||||||
# gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f
|
# gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f
|
||||||
@ -64,5 +64,5 @@ golang.org/x/sys/unix
|
|||||||
## explicit
|
## explicit
|
||||||
gopkg.in/yaml.v1
|
gopkg.in/yaml.v1
|
||||||
# gopkg.in/yaml.v2 v2.4.0
|
# gopkg.in/yaml.v2 v2.4.0
|
||||||
## explicit
|
## explicit; go 1.15
|
||||||
gopkg.in/yaml.v2
|
gopkg.in/yaml.v2
|
||||||
|
Reference in New Issue
Block a user