diff --git a/.cirrus.yml b/.cirrus.yml deleted file mode 100644 index 6b1d0da3431..00000000000 --- a/.cirrus.yml +++ /dev/null @@ -1,13 +0,0 @@ -env: - CIRRUS_CLONE_DEPTH: "1" - -freebsd_instance: - image_family: freebsd-12-1-snap - -task: - install_script: | - pkg install -y git go - GOBIN=$PWD/bin go get golang.org/dl/go1.17 - bin/go1.17 download - build_script: bin/go1.17 build ./... - test_script: bin/go1.17 test -race ./... diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 767fabb1dde..7d7a057887b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -165,7 +165,7 @@ jobs: - name: ShellCheck uses: ludeeus/action-shellcheck@1.1.0 with: - scandir: ./assets/scripts + ignore: completions - name: Whitespace run: go run ./internal/cmds/lint-whitespace - name: Typos diff --git a/.gitignore b/.gitignore index 7cb1c45b521..6a14a5e3bca 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.exe +/.vagrant /bin/chezmoi /bin/gofumports /bin/golangci-lint diff --git a/Makefile b/Makefile index 9674177f66c..986a5194c2b 100644 --- a/Makefile +++ b/Makefile @@ -9,47 +9,51 @@ build: build-darwin build-freebsd build-linux build-windows .PHONY: build-darwin build-darwin: - GOOS=darwin GOARCH=amd64 $(GO) build -o /dev/null . - GOOS=darwin GOARCH=arm64 $(GO) build -o /dev/null . + GOOS=darwin GOARCH=amd64 ${GO} build -o /dev/null . + GOOS=darwin GOARCH=arm64 ${GO} build -o /dev/null . .PHONY: build-freebsd build-freebsd: - GOOS=freebsd GOARCH=amd64 $(GO) build -o /dev/null . + GOOS=freebsd GOARCH=amd64 ${GO} build -o /dev/null . .PHONY: build-linux build-linux: - GOOS=linux GOARCH=amd64 $(GO) build -o /dev/null . - GOOS=linux GOARCH=amd64 $(GO) build -tags=noupgrade -o /dev/null . + GOOS=linux GOARCH=amd64 ${GO} build -o /dev/null . + GOOS=linux GOARCH=amd64 ${GO} build -tags=noupgrade -o /dev/null . .PHONY: build-windows build-windows: - GOOS=windows GOARCH=amd64 $(GO) build -o /dev/null . + GOOS=windows GOARCH=amd64 ${GO} build -o /dev/null . .PHONY: run run: - $(GO) run . --version + ${GO} run . --version .PHONY: test test: - $(GO) test -ldflags="-X github.com/twpayne/chezmoi/internal/chezmoitest.umaskStr=0o022" ./... - $(GO) test -ldflags="-X github.com/twpayne/chezmoi/internal/chezmoitest.umaskStr=0o002" ./... + ${GO} test -ldflags="-X github.com/twpayne/chezmoi/internal/chezmoitest.umaskStr=0o022" ./... + ${GO} test -ldflags="-X github.com/twpayne/chezmoi/internal/chezmoitest.umaskStr=0o002" ./... + +.PHONY: test-os +test-os: + ( cd assets/vagrant && ./test.sh fedora33 freebsd13 openbsd6 ) .PHONY: coverage-html coverage-html: coverage - $(GO) tool cover -html=coverage.out + ${GO} tool cover -html=coverage.out .PHONY: coverage coverage: - $(GO) test -test.coverprofile=coverage.out ./... + ${GO} test -test.coverprofile=coverage.out ./... .PHONY: generate generate: - $(GO) generate + ${GO} generate .PHONY: lint lint: ensure-golangci-lint ./bin/golangci-lint run - $(GO) run ./internal/cmds/lint-whitespace + ${GO} run ./internal/cmds/lint-whitespace .PHONY: format format: ensure-gofumports @@ -62,7 +66,7 @@ ensure-tools: ensure-gofumports ensure-golangci-lint ensure-gofumports: if [ ! -x bin/gofumports ] ; then \ mkdir -p bin ; \ - GOBIN=$(shell pwd)/bin $(GO) install mvdan.cc/gofumpt/gofumports@latest ; \ + GOBIN=$(shell pwd)/bin ${GO} install mvdan.cc/gofumpt/gofumports@latest ; \ fi .PHONY: ensure-golangci-lint diff --git a/README.md b/README.md index c64a01e20c9..31077a4b720 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,8 @@ Updating your dotfiles on any machine is a single command: $ chezmoi update ``` +--- + * [How do I start with chezmoi now?](#how-do-i-start-with-chezmoi-now) * [What does chezmoi do and why should I use it?](#what-does-chezmoi-do-and-why-should-i-use-it) * [What are chezmoi's key features?](#what-are-chezmois-key-features) @@ -32,6 +34,7 @@ $ chezmoi update * [What documentation is available?](#what-documentation-is-available) * [License](#license) +--- ## How do I start with chezmoi now? [Install chezmoi](docs/INSTALL.md) then read the [quick start @@ -44,6 +47,7 @@ GitLab](https://gitlab.com/search?search=chezmoi), and see how chezmoi [compares to other dotfile managers](docs/COMPARISON.md). For a full description of chezmoi, consult the [reference](docs/REFERENCE.md). +--- ## What does chezmoi do and why should I use it? chezmoi helps you manage your personal configuration files (dotfiles, like @@ -71,6 +75,8 @@ If you do not personalize your configuration or only ever use a single operating system with a single account and none of your dotfiles contain secrets then you don't need chezmoi. Otherwise, read on... +--- + ## What are chezmoi's key features? ### Flexible @@ -123,10 +129,14 @@ commands, including installation, initialization, and keeping your machines up-to-date. chezmoi can pull and apply changes from your dotfiles repo in a single command, and automatically commit and push changes. +--- + ## I already have a system to manage my dotfiles, why should I use chezmoi? Read the [comparison of chezmoi to other dotfile managers](docs/COMPARISON.md). +--- + ## How do people use chezmoi? ### Dotfile repos using chezmoi @@ -139,6 +149,8 @@ GitLab](https://gitlab.com/search?search=chezmoi). Read what [people have said about chezmoi](docs/MEDIA.md). +--- + ## What documentation is available? * [Install guide](docs/INSTALL.md) to get chezmoi installed on your machine with @@ -156,6 +168,10 @@ Read what [people have said about chezmoi](docs/MEDIA.md). * [Contributing](docs/CONTRIBUTING.md) and [Architecture](docs/ARCHITECTURE.md) for people looking to contribute to or package chezmoi. +--- + ## License MIT + +--- diff --git a/assets/chezmoi.io/content/_index.md b/assets/chezmoi.io/content/_index.md index 92a43f24852..456f3df7edc 100644 --- a/assets/chezmoi.io/content/_index.md +++ b/assets/chezmoi.io/content/_index.md @@ -20,6 +20,8 @@ Updating your dotfiles on any machine is a single command: $ chezmoi update ``` +--- + ## How do I start with chezmoi now? [Install chezmoi](/docs/install/) then read the [quick start @@ -32,6 +34,8 @@ GitLab](https://gitlab.com/search?search=chezmoi), and see how chezmoi [compares to other dotfile managers](/docs/comparison/). For a full description of chezmoi, consult the [reference](/docs/reference/). +--- + ## What does chezmoi do and why should I use it? chezmoi helps you manage your personal configuration files (dotfiles, like @@ -59,6 +63,8 @@ If you do not personalize your configuration or only ever use a single operating system with a single account and none of your dotfiles contain secrets then you don't need chezmoi. Otherwise, read on... +--- + ## What are chezmoi's key features? ### Flexible @@ -111,10 +117,14 @@ commands, including installation, initialization, and keeping your machines up-to-date. chezmoi can pull and apply changes from your dotfiles repo in a single command, and automatically commit and push changes. +--- + ## I already have a system to manage my dotfiles, why should I use chezmoi? Read the [comparison of chezmoi to other dotfile managers](/docs/comparison/). +--- + ## How do people use chezmoi? ### Dotfile repos using chezmoi @@ -127,6 +137,8 @@ GitLab](https://gitlab.com/search?search=chezmoi). Read what [people have said about chezmoi](/docs/media/). +--- + ## What documentation is available? * [Install guide](/docs/install/) to get chezmoi installed on your machine with @@ -144,6 +156,10 @@ Read what [people have said about chezmoi](/docs/media/). * [Contributing](/docs/contributing/) and [Architecture](/docs/architecture/) for people looking to contribute to or package chezmoi. +--- + ## License MIT + +--- diff --git a/assets/chezmoi.io/make-gh-pages.sh b/assets/chezmoi.io/make-gh-pages.sh index 679b8be1c50..999ae7ab4ba 100755 --- a/assets/chezmoi.io/make-gh-pages.sh +++ b/assets/chezmoi.io/make-gh-pages.sh @@ -7,21 +7,20 @@ rm -rf public/ hugo # clone and checkout the gh-pages branch in a temporary directory -oldwd=$(pwd) tmpdir=$(mktemp -d) cleanup() { - rm -rf ${tmpdir} + rm -rf "${tmpdir}" } trap cleanup EXIT git branch -f gh-pages origin/gh-pages -git clone --branch=gh-pages --local ../.. ${tmpdir} +git clone --branch=gh-pages --local ../.. "${tmpdir}" # copy the new website to the temporary directory -rm -rf ${tmpdir}/* -cp -r public/* ${tmpdir} +rm -rf "${tmpdir:?}"/* +cp -r public/* "${tmpdir}" # prepare the clone -cd ${tmpdir} +cd "${tmpdir}" git checkout CNAME git remote set-url origin https://github.com/twpayne/chezmoi.git git fetch origin diff --git a/assets/vagrant/fedora33.Vagrantfile b/assets/vagrant/fedora33.Vagrantfile new file mode 100644 index 00000000000..8bc8084034a --- /dev/null +++ b/assets/vagrant/fedora33.Vagrantfile @@ -0,0 +1,9 @@ +Vagrant.configure("2") do |config| + config.vm.box = "generic/fedora33" + config.vm.hostname = "fedora33" + config.vm.synced_folder ".", "/chezmoi", type: "rsync" + config.vm.provision "shell", inline: <<-SHELL + yum install --quiet --assumeyes git gnupg golang + SHELL + config.vm.provision "file", source: "assets/vagrant/fedora33.test-chezmoi.sh", destination: "test-chezmoi.sh" +end diff --git a/assets/vagrant/fedora33.test-chezmoi.sh b/assets/vagrant/fedora33.test-chezmoi.sh new file mode 100644 index 00000000000..35d2f3554df --- /dev/null +++ b/assets/vagrant/fedora33.test-chezmoi.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +go get golang.org/dl/go1.17 +"$HOME"/go/bin/go1.17 download +( cd /chezmoi && "$HOME"/go/bin/go1.17 test ./... ) diff --git a/assets/vagrant/freebsd13.Vagrantfile b/assets/vagrant/freebsd13.Vagrantfile new file mode 100644 index 00000000000..72427967865 --- /dev/null +++ b/assets/vagrant/freebsd13.Vagrantfile @@ -0,0 +1,9 @@ +Vagrant.configure("2") do |config| + config.vm.box = "generic/freebsd13" + config.vm.hostname = "freebsd13" + config.vm.synced_folder ".", "/chezmoi", type: "rsync" + config.vm.provision "shell", inline: <<-SHELL + pkg install --quiet --yes git gnupg go + SHELL + config.vm.provision "file", source: "assets/vagrant/freebsd13.test-chezmoi.sh", destination: "test-chezmoi.sh" +end diff --git a/assets/vagrant/freebsd13.test-chezmoi.sh b/assets/vagrant/freebsd13.test-chezmoi.sh new file mode 100644 index 00000000000..ffeef72de3c --- /dev/null +++ b/assets/vagrant/freebsd13.test-chezmoi.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +( cd /chezmoi && go test ./... ) diff --git a/assets/vagrant/openbsd6.Vagrantfile b/assets/vagrant/openbsd6.Vagrantfile new file mode 100644 index 00000000000..70d50758fe9 --- /dev/null +++ b/assets/vagrant/openbsd6.Vagrantfile @@ -0,0 +1,9 @@ +Vagrant.configure("2") do |config| + config.vm.box = "generic/openbsd6" + config.vm.hostname = "openbsd6" + config.vm.synced_folder ".", "/chezmoi", type: "rsync" + config.vm.provision "shell", inline: <<-SHELL + pkg_add -x git gnupg go + SHELL + config.vm.provision "file", source: "assets/vagrant/openbsd6.test-chezmoi.sh", destination: "test-chezmoi.sh" +end diff --git a/assets/vagrant/openbsd6.test-chezmoi.sh b/assets/vagrant/openbsd6.test-chezmoi.sh new file mode 100644 index 00000000000..ffeef72de3c --- /dev/null +++ b/assets/vagrant/openbsd6.test-chezmoi.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +( cd /chezmoi && go test ./... ) diff --git a/assets/vagrant/test.sh b/assets/vagrant/test.sh new file mode 100755 index 00000000000..01b61f6fbaf --- /dev/null +++ b/assets/vagrant/test.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +for os in "$@"; do + if [ -f "${os}.Vagrantfile" ]; then + export VAGRANT_VAGRANTFILE=assets/vagrant/${os}.Vagrantfile + ( + cd ../.. && + vagrant up && + vagrant ssh -c "sh test-chezmoi.sh" && + vagrant destroy -f + ) + else + echo "${os}.Vagrantfile not found" + fi +done diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 1353c20f724..03442ba9af1 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -4,14 +4,16 @@ * [Introduction](#introduction) * [Directory structure](#directory-structure) * [Key concepts](#key-concepts) -* [`internal/chezmoi/`](#internalchezmoi) -* [`internal/cmd/`](#internalcmd) +* [`internal/chezmoi/` directory](#internalchezmoi-directory) +* [`internal/cmd/` directory](#internalcmd-directory) * [Path handling](#path-handling) * [Persistent state](#persistent-state) * [Encryption](#encryption) * [`run_once_` scripts](#run_once_-scripts) * [Testing](#testing) +--- + ## Introduction This document gives a high-level overview of chezmoi's source code for anyone @@ -28,6 +30,8 @@ You can also [browse chezmoi's generated documentation online](https://pkg.go.dev/github.com/twpayne/chezmoi/v2) but this only includes exported symbols. +--- + ## Directory structure The important directories in chezmoi are: @@ -39,6 +43,8 @@ The important directories in chezmoi are: | `internal/cmd/` | Code for the `chezmoi` command. | | `internal/cmd/testdata/scripts/` | High-level tests of chezmoi's commands using [`testscript`](https://pkg.go.dev/github.com/rogpeppe/go-internal/testscript). | +--- + ## Key concepts As described in the [reference manual](REFERENCE.md), chezmoi evaluates the @@ -51,7 +57,9 @@ directly in chezmoi's code. chezmoi uses the generic term *entry* to describe something that it manages. Entries can be files, directories, symlinks, scripts, amongst other things. -## `internal/chezmoi/` +--- + +## `internal/chezmoi/` directory All of chezmoi's interaction with the operating system is abstracted through the `System` interface. A `System` includes functionality to read and write files @@ -111,7 +119,9 @@ persistent state. chezmoi can then detect if a third party has updated a target since chezmoi last wrote it by comparing the actual state entry in the target state with the entry state in the persistent state. -## `internal/cmd/` +--- + +## `internal/cmd/` directory `internal/cmd/*cmd.go` contains the code for each individual command and `internal/cmd/*templatefuncs.go` contain the template functions. @@ -124,6 +134,8 @@ The `Config.persistentPreRunRootE` and `Config.persistentPostRunRootE` methods set up and tear down state for individual commands based on the command's `Annotations` field. +--- + ## Path handling chezmoi uses separate types for absolute paths (`AbsPath`) and relative paths @@ -139,6 +151,8 @@ directory, use forward or backward slashes, and are treated as external paths internally and makes no attempt to handle case-insensitive or case-preserving filesystems. +--- + ## Persistent state Persistent state is treated as a two-level key-value store with the @@ -149,6 +163,8 @@ mode (`--dry-run`) the actual persistent state is copied into a temporary persistent state in memory which remembers writes but does not persist them to disk. +--- + ## Encryption Encryption tools are abstracted by the `Encryption` interface that contains @@ -156,12 +172,16 @@ methods of encrypting and decrypting files and `[]byte`s. Implementations are the `AGEEncryption` and `GPGEncryption` structs. A `DebugEncryption` struct wraps an `Encryption` interface and logs the methods called. +--- + ## `run_once_` scripts The execution of `run_once_` scripts is recorded by storing the SHA256 of their contents in the persistent state. `run_once_` scripts are only run if they are new or if their contents have not changed. +--- + ## Testing chezmoi has a mix of, unit, integration, and end-to-end tests. Unit and @@ -181,3 +201,5 @@ where `` is the basename of file in `testdata/scripts`. Tests should, if at all possible, run unmodified on all operating systems tested in CI (Linux, macOS, Windows, and FreeBSD). Windows will sometimes need special handling due to its path separator and lack of POSIX-style file permissions. + +--- diff --git a/docs/CHANGES.md b/docs/CHANGES.md index 801b363d425..18bf5d2f52b 100644 --- a/docs/CHANGES.md +++ b/docs/CHANGES.md @@ -6,6 +6,8 @@ * [New features in version 2](#new-features-in-version-2) * [Changes from version 1](#changes-from-version-1) +--- + ## Overview This document describes what's new in chezmoi v2 for chezmoi v1 users. @@ -29,12 +31,16 @@ read the [how-to guide](https://github.com/twpayne/chezmoi/blob/master/docs/HOWTO.md) to quickly discover chezmoi's functionality. +--- + ## Version 2 chezmoi version 2 brings many new features and fixes a few corner-case bugs. Very few, if any, changes should be required to your source directory, templates, or config file. +--- + ### New features in version 2 * The new `chezmoi status` command shows you a concise list of differences, much @@ -89,6 +95,8 @@ templates, or config file. fully-qualified domain name of the machine, if it can be determined. * You can now encrypt whole files with [age](https://age-encryption.org). +--- + ### Changes from version 1 chezmoi version 2 includes a few minor changes from version 1, mainly to enable @@ -122,3 +130,5 @@ the new functionality and for consistency: supported until version 2.1. * The `.chezmoi.fullHostname` template variable has been removed, as it did not contain the full hostname. Use `.chezmoi.fqdnHostname` (UNIX only) instead. + +--- diff --git a/docs/COMPARISON.md b/docs/COMPARISON.md index bf07ee6b771..d46b72414e8 100644 --- a/docs/COMPARISON.md +++ b/docs/COMPARISON.md @@ -9,6 +9,8 @@ * [You have to maintain your own tool](#you-have-to-maintain-your-own-tool) * [Setting up your dotfiles requires more than one short command](#setting-up-your-dotfiles-requires-more-than-one-short-command) +--- + ## Comparison table [chezmoi]: https://chezmoi.io/ @@ -53,6 +55,8 @@ For more comparisons, visit [dotfiles.github.io](https://dotfiles.github.io/). +--- + ## Why should I use a dotfile manager? Dotfile managers give you the combined benefit of a consistent environment @@ -71,6 +75,8 @@ undo command, or develop software without a version control system, chezmoi brings the investment that you have made in mastering your tools to every environment that you work in. +--- + ## I already have a system to manage my dotfiles, why should I use chezmoi? > Regular reminder that chezmoi is the best dotfile manager utility I've used @@ -91,6 +97,8 @@ If you're using any of the following methods: Then you've probably run into at least one of the following problems. +--- + ### Coping with differences between machines requires extra effort If you want to synchronize your dotfiles across multiple operating systems or @@ -104,6 +112,8 @@ chezmoi uses a single source of truth (a single branch) and a single command that works on every machine. Individual files can be templates to handle machine to machine differences, if needed. +--- + ### You have to keep your dotfiles repo private > And regarding dotfiles, I saw that. It's only public dotfiles repos so I have @@ -125,6 +135,8 @@ dotfiles repository anywhere, and even make your dotfiles repo public, without leaving personal secrets on your work machine or work secrets on your personal machine. +--- + ### You have to maintain your own tool > I've offloaded my dotfiles deployment from a homespun shell script to chezmoi. @@ -151,6 +163,8 @@ both unit and integration tests. When you hit the limits of your existing dotfile management system, chezmoi already has a tried-and-tested solution ready for you to use. +--- + ### Setting up your dotfiles requires more than one short command If your system is written in a scripting language like Python, Perl, or Ruby, @@ -163,3 +177,5 @@ need git installed. chezmoi provides one-line installs, pre-built binaries, packages for Linux and BSD distributions, Homebrew formulae, Scoop and Chocolatey support on Windows, and a initial config file generation mechanism to make installing your dotfiles on a new machine as painless as possible. + +--- diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 0532ac9f0af..5e45c7421a8 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -9,6 +9,8 @@ * [Packaging](#packaging) * [Updating the website](#updating-the-website) +--- + ## Getting started chezmoi is written in [Go](https://golang.org) and development happens on @@ -18,6 +20,8 @@ checked out chezmoi locally. The [Architecture Guide](ARCHITECTURE.md) contains a high-level overview of chezmoi's source code. +--- + ## Developing locally chezmoi requires Go 1.17 or later. @@ -47,6 +51,8 @@ Run chezmoi: $ go run . ``` +--- + ## Generated code chezmoi generates shell completions, the install script, and the website from a @@ -67,6 +73,8 @@ chezmoi's continuous integration verifies that all generated files are up to date. Changes to generated files should be included in the commit that modifies the source of truth. +--- + ## Contributing changes Bug reports, bug fixes, and documentation improvements are always welcome. @@ -111,6 +119,8 @@ that: * The branch applies cleanly to `master`. +--- + ## Managing releases Releases are managed with [`goreleaser`](https://goreleaser.com/). @@ -147,6 +157,8 @@ $ snapcraft export-login --snaps=chezmoi --channels=stable,candidate,beta,edge - $ brew bump-formula-pr --tag=v1.2.3 chezmoi ``` +--- + ## Packaging If you're packaging chezmoi for an operating system or distribution: @@ -193,6 +205,8 @@ If you're packaging chezmoi for an operating system or distribution: guide](https://github.com/twpayne/chezmoi/blob/master/docs/INSTALL.md) are absent or incorrect, please open an issue or submit a PR to correct them. +--- + ## Updating the website [The website](https://chezmoi.io) is generated with [Hugo](https://gohugo.io/) @@ -234,3 +248,5 @@ $ git push to push them. You can only push changes if you have write permissions to the chezmoi GitHub repo. + +--- diff --git a/docs/FAQ.md b/docs/FAQ.md index 2ea99d0b492..8b6b80c8757 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -29,6 +29,8 @@ * [Where do I ask a question that isn't answered here?](#where-do-i-ask-a-question-that-isnt-answered-here) * [I like chezmoi. How do I say thanks?](#i-like-chezmoi-how-do-i-say-thanks) +--- + ## How can I quickly check for problems with chezmoi on my machine? Run: @@ -40,6 +42,8 @@ $ chezmoi doctor Anything `ok` is fine, anything `warning` is only a problem if you want to use the related feature, and anything `error` indicates a definite problem. +--- + ## How do I edit my dotfiles with chezmoi? There are four popular approaches: @@ -56,6 +60,8 @@ There are four popular approaches: `chezmoi add $FILE` or `chezmoi re-add`. Note that `re-add` doesn't work with templates. +--- + ## Do I have to use `chezmoi edit` to edit my dotfiles? No. `chezmoi edit` is a convenience command that has a couple of useful @@ -75,6 +81,8 @@ you can run `chezmoi diff` to check what effect the changes would have, and run or `chezmoi apply`. Note also that the arguments to `chezmoi edit` are the files in their target location. +--- + ## What are the consequences of "bare" modifications to the target files? If my `.zshrc` is managed by chezmoi and I edit `~/.zshrc` without using `chezmoi edit`, what happens? Until you run `chezmoi apply` your modified `~/.zshrc` will remain in place. @@ -82,15 +90,21 @@ When you run `chezmoi apply` chezmoi will detect that `~/.zshrc` has changed since chezmoi last wrote it and prompt you what to do. You can resolve differences with a merge tool by running `chezmoi merge ~/.zshrc`. +--- + ## How can I tell what dotfiles in my home directory aren't managed by chezmoi? Is there an easy way to have chezmoi manage a subset of them? `chezmoi unmanaged` will list everything not managed by chezmoi. You can add entire directories with `chezmoi add`. +--- + ## How can I tell what dotfiles in my home directory are currently managed by chezmoi? `chezmoi managed` will list everything managed by chezmoi. +--- + ## If there's a mechanism in place for the above, is there also a way to tell chezmoi to ignore specific files or groups of files (e.g. by directory name or by glob)? By default, chezmoi ignores everything that you haven't explicitly added. If you @@ -102,12 +116,16 @@ Patterns are supported, and you can change what's ignored from machine to machine. The full usage and syntax is described in the [reference manual](https://github.com/twpayne/chezmoi/blob/master/docs/REFERENCE.md#chezmoiignore). +--- + ## If the target already exists, but is "behind" the source, can chezmoi be configured to preserve the target version before replacing it with one derived from the source? Yes. Run `chezmoi add` will update the source state with the target. To see diffs of what would change, without actually changing anything, use `chezmoi diff`. +--- + ## Once I've made a change to the source directory, how do I commit it? You have several options: @@ -122,12 +140,16 @@ You have several options: source state, as [described in the how-to guide](https://github.com/twpayne/chezmoi/blob/master/docs/HOWTO.md#automatically-commit-and-push-changes-to-your-repo). +--- + ## I've made changes to both the destination state and the source state that I want to keep. How can I keep them both? `chezmoi merge` will open a merge tool to resolve differences between the source state, target state, and destination state. Copy the changes you want to keep in to the source state. +--- + ## Why does chezmoi convert all my template variables to lowercase? This is due to a feature in @@ -135,6 +157,8 @@ This is due to a feature in chezmoi uses to read its configuration file. For more information see [this GitHub issue](https://github.com/twpayne/chezmoi/issues/463). +--- + ## chezmoi makes `~/.ssh/config` group writeable. How do I stop this? By default, chezmoi uses your system's umask when creating files. On most @@ -155,6 +179,8 @@ to control group write permissions for individual files or directories. Please GitHub](https://github.com/twpayne/chezmoi/issues/new?assignees=&labels=enhancement&template=02_feature_request.md&title=) if you need this. +--- + ## Why does `chezmoi cd` spawn a shell instead of just changing directory? `chezmoi cd` spawns a shell because it is not possible for a program to change @@ -169,6 +195,8 @@ chezmoi-cd() { Typing `chezmoi-cd` will then change the directory of your current shell to chezmoi's source directory. +--- + ## Why doesn't chezmoi use symlinks like GNU Stow? Symlinks are first class citizens in chezmoi: chezmoi supports creating them, @@ -212,6 +240,8 @@ for example) but it does need some convincing use cases that demonstrate that a symlink from a dotfile's location to its contents in a central directory is better than just having the correct dotfile contents. +--- + ## What are the limitations of chezmoi's symlink mode? In symlink mode chezmoi replaces targets with symlinks to the source directory @@ -240,6 +270,8 @@ might not be usable with symlinks. In symlink mode, running `chezmoi add` does not immediately replace the targets with a symlink. You must run `chezmoi apply` to create the symlinks. +--- + ## Can I change how chezmoi's source state is represented on disk? There are a number of criticisms of how chezmoi's source state is represented on @@ -320,6 +352,8 @@ but must meet the following criteria, in order of importance: 4. Not add significant extra complexity to the user interface or underlying implementation. +--- + ## gpg encryption fails. What could be wrong? The `gpg.recipient` key should be ultimately trusted, otherwise encryption will @@ -339,6 +373,8 @@ $ gpg --edit-key $recipient Enter `trust` at the prompt and chose `5 = I trust ultimately`. +--- + ## chezmoi reports `chezmoi: user: lookup userid NNNNN: input/output error` This is likely because the chezmoi binary you are using was statically compiled @@ -352,6 +388,8 @@ of the statically-compiled binary. If the problem still persists, then please [open an issue on GitHub](https://github.com/twpayne/chezmoi/issues/new/choose). +--- + ## chezmoi reports `chezmoi: timeout` or `chezmoi: timeout obtaining persistent state lock` chezmoi will report this when it is unable to lock its persistent state @@ -368,6 +406,8 @@ Commands that take a write lock include `add`, `apply`, `edit`, `forget`, `import`, `init`, `state`, `unmanage`, and `update`. Commands that take a read lock include `diff`, `status`, and `verify`. +--- + ## I'm getting errors trying to build chezmoi from source chezmoi requires Go version 1.17 or later. You can check the version of Go with: @@ -379,6 +419,8 @@ $ go version For more details on building chezmoi, see the [Contributing Guide]([CONTRIBUTING.md](https://github.com/twpayne/chezmoi/blob/master/docs/CONTRIBUTING.md)). +--- + ## What inspired chezmoi? chezmoi was inspired by [Puppet](https://puppet.com/), but was created because @@ -386,6 +428,8 @@ Puppet is an overkill for managing your personal configuration files. The focus of chezmoi will always be personal home directory management. If your needs grow beyond that, switch to a whole system configuration management tool. +--- + ## Why not use Ansible/Chef/Puppet/Salt, or similar to manage my dotfiles instead? Whole system management tools are more than capable of managing your dotfiles, @@ -405,6 +449,8 @@ chezmoi's focus and simple installation means that it runs almost everywhere: from tiny ARM-based Linux systems to Windows desktops, from inside lightweight containers to FreeBSD-based virtual machines in the cloud. +--- + ## Can I use chezmoi to manage files outside my home directory? In practice, yes, you can, but this is strongly discouraged beyond using your @@ -442,21 +488,29 @@ Put your Puppet Manifests, Chef Recipes, Ansible Modules, and Salt Modules in a directory ignored by `.chezmoiignore` so they do not pollute your home directory. +--- + ## Where does the name "chezmoi" come from? "chezmoi" splits to "chez moi" and pronounced /ʃeɪ mwa/ (shay-moi) meaning "at my house" in French. It's seven letters long, which is an appropriate length for a command that is only run occasionally. +--- + ## What other questions have been asked about chezmoi? See the [issues on GitHub](https://github.com/twpayne/chezmoi/issues?utf8=%E2%9C%93&q=is%3Aissue+sort%3Aupdated-desc+label%3Asupport). +--- + ## Where do I ask a question that isn't answered here? Please [open an issue on GitHub](https://github.com/twpayne/chezmoi/issues/new/choose). +--- + ## I like chezmoi. How do I say thanks? Thank you! chezmoi was written to scratch a personal itch, and I'm very happy @@ -475,3 +529,5 @@ welcome](https://github.com/twpayne/chezmoi/blob/master/docs/CONTRIBUTING.md) and every [bug report, support request, and feature request](https://github.com/twpayne/chezmoi/issues/new/choose) helps make chezmoi better. Thank you :) + +--- diff --git a/docs/HOWTO.md b/docs/HOWTO.md index 3781663d349..061643a7f6d 100644 --- a/docs/HOWTO.md +++ b/docs/HOWTO.md @@ -58,8 +58,12 @@ * [Migrate from a dotfile manager that uses symlinks](#migrate-from-a-dotfile-manager-that-uses-symlinks) * [Migrate away from chezmoi](#migrate-away-from-chezmoi) +--- + ## Perform daily operations +--- + ### Use a hosted repo to manage your dotfiles across multiple machines chezmoi relies on your version control system and hosted repo to share changes @@ -100,6 +104,8 @@ The above commands can be combined into a single init, checkout, and apply: $ chezmoi init --apply --verbose https://github.com/username/dotfiles.git ``` +--- + ### Pull the latest changes from your repo and apply them You can pull the changes from your repo and apply them in a single command: @@ -110,6 +116,8 @@ $ chezmoi update This runs `git pull --rebase` in your source directory and then `chezmoi apply`. +--- + ### Pull the latest changes from your repo and see what would change, without actually applying the changes Run: @@ -130,6 +138,8 @@ $ chezmoi apply to apply them. +--- + ### Automatically commit and push changes to your repo chezmoi can automatically commit and push changes to your source directory to @@ -153,6 +163,8 @@ Be careful when using `autoPush`. If your dotfiles repo is public and you accidentally add a secret in plain text, that secret will be pushed to your public repo. +--- + ### Install chezmoi and your dotfiles on a new machine with a single command chezmoi's install script can run `chezmoi init` for you by passing extra @@ -178,8 +190,12 @@ with a single command: $ sh -c "$(curl -fsLS git.io/chezmoi)" -- init --one-shot ``` +--- + ## Manage different types of file +--- + ### Have chezmoi create a directory, but ignore its contents If you want chezmoi to create a directory, but ignore its contents, say `~/src`, @@ -204,6 +220,8 @@ $ touch $(chezmoi source-path)/src/.keep chezmoi automatically creates `.keep` files when you add an empty directory with `chezmoi add`. +--- + ### Ensure that a target is removed Create a file called `.chezmoiremove` in the source directory containing a list @@ -225,6 +243,8 @@ $ chezmoi apply --remove --dry-run --verbose on different machines. Negative matches (patterns prefixed with a `!`) or targets listed in `.chezmoiignore` will never be removed. +--- + ### Manage part, but not all, of a file chezmoi, by default, manages whole files, but there are two ways to manage just @@ -246,6 +266,8 @@ substituted with: current-context: {{ output "kubectl" "config" "current-context" | trim }} ``` +--- + ### Populate `~/.ssh/authorized_keys` with your public SSH keys from GitHub chezmoi can retrieve your public SSH keys from GitHub, which can be useful for @@ -259,8 +281,12 @@ GitHub username: {{ end -}} ``` +--- + ## Integrate chezmoi with your editor +--- + ### Configure VIM to run `chezmoi apply` whenever you save a dotfile Put the following in your `.vimrc`: @@ -269,8 +295,12 @@ Put the following in your `.vimrc`: autocmd BufWritePost ~/.local/share/chezmoi/* ! chezmoi apply --source-path % ``` +--- + ## Include dotfiles from elsewhere +--- + ### Include a subdirectory from another repository, like Oh My Zsh To include a subdirectory from another repository, e.g. [Oh My @@ -322,6 +352,8 @@ When using Oh My Zsh, make sure you disable auto-updates by setting `~/.oh-my-zsh` directory to drift out of sync with chezmoi's source state. To update Oh My Zsh and its plugins, refresh the downloaded archives. +--- + ### Handle configuration files which are externally modified Some programs modify their configuration files. When you next run `chezmoi @@ -363,6 +395,8 @@ $ chezmoi apply -v Now, when the program modifies its configuration file it will modify the file in the source state instead. +--- + ### Import archives It is occasionally useful to import entire archives of configuration into your @@ -384,8 +418,12 @@ $ chezmoi apply to update your destination directory. +--- + ## Manage machine-to-machine differences +--- + ### Use templates The primary goal of chezmoi is to manage configuration files across multiple @@ -506,6 +544,8 @@ will be removed. This can be used to ensure that files are only present on certain machines. If you want an empty file to be created anyway, you will need to give it an `empty_` prefix. +--- + ### Ignore files or a directory on different machines For coarser-grained control of files and entire directories managed on different @@ -535,6 +575,8 @@ f* will ignore all files beginning with an `f` except `foo`. +--- + ### Use completely different dotfiles on different machines chezmoi's template functionality allows you to change a file's contents based on @@ -602,6 +644,8 @@ The same thing can be achieved using the include function. {{ end }} ``` +--- + ### Create a config file on a new machine automatically `chezmoi init` can also create a config file automatically, if one does not @@ -628,6 +672,8 @@ To test this template, use `chezmoi execute-template` with the `--init` and $ chezmoi execute-template --init --promptString email=me@home.org < ~/.local/share/chezmoi/.chezmoi.toml.tmpl ``` +--- + ### Re-create your config file If you change your config file template, chezmoi will warn you if your current @@ -667,6 +713,8 @@ For boolean variables you can use: var = {{ $var }} ``` +--- + ### Handle different file locations on different systems with the same contents If you want to have the same file contents in different locations on different @@ -694,6 +742,8 @@ Library/Application Support/App/file.conf {{ end }} ``` +--- + ### Create an archive of your dotfiles `chezmoi archive` creates an archive containing the target state. This can be @@ -701,6 +751,8 @@ useful for generating target state for a different machine. You can specify a different configuration file (including template variables) with the `--config` option. +--- + ## Keep data private chezmoi automatically detects when files and directories are private when adding @@ -724,6 +776,8 @@ token](https://help.github.com/articles/creating-a-personal-access-token-for-the There are several ways to keep these tokens secure, and to prevent them leaving your machine. +--- + ### Use 1Password chezmoi includes support for [1Password](https://1password.com/) using the @@ -773,6 +827,8 @@ instructs the template language to remove any whitespace before and after the substitution. This removes any trailing newline added by your editor when saving the template. +--- + ### Use Bitwarden chezmoi includes support for [Bitwarden](https://bitwarden.com/) using the @@ -809,6 +865,8 @@ with: {{ (bitwardenFields "item" "example.com").token.value }} ``` +--- + ### Use gopass chezmoi includes support for [gopass](https://www.gopass.pw/) using the gopass CLI. @@ -820,6 +878,8 @@ The first line of the output of `gopass show ` is available as the {{ gopass "" }} ``` +--- + ### Use KeePassXC chezmoi includes support for [KeePassXC](https://keepassxc.org) using the @@ -848,6 +908,8 @@ called `private-key`, its value is available as: {{ keepassxcAttribute "SSH Key" "private-key" }} ``` +--- + ### Use Keychain or Windows Credentials Manager chezmoi includes support for Keychain (on macOS), GNOME Keyring (on Linux), and @@ -885,6 +947,8 @@ You can query the keyring from the command line: $ chezmoi secret keyring get --service=github --user= ``` +--- + ### Use LastPass chezmoi includes support for [LastPass](https://lastpass.com) using the @@ -934,6 +998,8 @@ can use `lastpassRaw` to get its raw value, for example: {{ (index (lastpassRaw "SSH Private Key") 0).note }} ``` +--- + ### Use pass chezmoi includes support for [pass](https://www.passwordstore.org/) using the @@ -946,6 +1012,8 @@ The first line of the output of `pass show ` is available as the {{ pass "" }} ``` +--- + ### Use Vault chezmoi includes support for [Vault](https://www.vaultproject.io/) using the @@ -968,6 +1036,8 @@ language to extract the data you want. For example: {{ (vault "").data.data.password }} ``` +--- + ### Use a custom password manager You can use any command line tool that outputs secrets either as a string or in @@ -985,6 +1055,8 @@ respectively. All of the above secret managers can be supported in this way: | KeePassXC | `keepassxc-cli` | Not possible (interactive command only) | | pass | `pass` | `{{ secret "show" }}` | +--- + ### Encrypt whole files with gpg chezmoi supports encrypting files with [gpg](https://www.gnupg.org/). Encrypted @@ -993,6 +1065,8 @@ generating the target state or printing a file's contents with `chezmoi cat`. `chezmoi edit` will transparently decrypt the file before editing and re-encrypt it afterwards. +--- + #### Asymmetric (private/public-key) encryption Specify the encryption key to use in your configuration file (`chezmoi.toml`) @@ -1019,6 +1093,8 @@ gpg --armor --recipient ${gpg.recipient} --encrypt and store the encrypted file in the source state. The file will automatically be decrypted when generating the target state. +--- + #### Symmetric encryption Specify symmetric encryption in your configuration file: @@ -1041,6 +1117,8 @@ chezmoi will encrypt the file with: gpg --armor --symmetric ``` +--- + ### Encrypt whole files with age chezmoi supports encrypting files with [age](https://age-encryption.org/). @@ -1075,6 +1153,8 @@ $ chezmoi add --encrypt ~/.ssh/id_rsa chezmoi supports multiple recipients and recipient files, and multiple identities. +--- + #### Symmetric encryption To use age's symmetric encryption, specify a single identity and enable @@ -1087,6 +1167,8 @@ encryption = "age" symmetric = true ``` +--- + #### Symmetric encryption with a passphrase To use age's symmetric encryption with a passphrase, set `age.passphrase` to @@ -1102,6 +1184,8 @@ You will be prompted for the passphrase whenever you run `chezmoi add --encrypt` and whenever chezmoi needs to decrypt the file, for example when you run `chezmoi apply`, `chezmoi diff`, or `chezmoi status`. +--- + ### Use a private configuration file and template variables Typically, `~/.config/chezmoi/chezmoi.toml` is not checked in to version control @@ -1128,8 +1212,12 @@ Your `~/.local/share/chezmoi/private_dot_gitconfig.tmpl` can then contain: Any config files containing tokens in plain text should be private (permissions `0600`). +--- + ## Use scripts to perform actions +--- + ### Understand how scripts work chezmoi supports scripts, which are executed when you run `chezmoi apply`. The @@ -1156,6 +1244,8 @@ template variables available. If, after executing the template, the result is only whitespace or an empty string, then the script is not executed. This is useful for disabling scripts. +--- + ### Install packages with scripts Change to the source directory and create a file called @@ -1192,6 +1282,8 @@ brew install ripgrep This will install `ripgrep` on both Debian/Ubuntu Linux systems and macOS. +--- + ### Run a script when the contents of another file changes chezmoi's `run_` scripts are run every time you run `chezmoi apply`, whereas @@ -1220,8 +1312,12 @@ change. In this example you should also add `dconf.ini` to `.chezmoiignore` so chezmoi does not create `dconf.ini` in your home directory. +--- + ## Use chezmoi on macOS +--- + ### Use `brew bundle` to manage your brews and casks Homebrew's [`brew bundle` @@ -1246,8 +1342,12 @@ Note that the `Brewfile` is embedded directly in the script with a bash here document. chezmoi will run this script whenever its contents change, i.e. when you add or remove brews or casks. +--- + ## Use chezmoi on Windows +--- + ### Detect Windows Subsystem for Linux (WSL) WSL can be detected by looking for the string `Microsoft` or `microsoft` in @@ -1262,6 +1362,8 @@ WSL can be detected by looking for the string `Microsoft` or `microsoft` in {{ end }} ``` +--- + ### Run a PowerShell script as admin on Windows Put the following at the top of your script: @@ -1277,6 +1379,8 @@ if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdent } ``` +--- + ## Use chezmoi with GitHub Codespaces, Visual Studio Codespaces, or Visual Studio Code Remote - Containers The following assumes you are using chezmoi 1.8.4 or later. It does not work @@ -1375,8 +1479,12 @@ sudo apt install -y vim-gtk {{- end -}} ``` +--- + ## Customize chezmoi +--- + ### Don't show scripts in the diff output By default, `chezmoi diff` will show all changes, including the contents of @@ -1389,6 +1497,8 @@ for example: exclude = ["scripts"] ``` +--- + ### Customize the diff pager You can change the diff format, and/or pipe the output into a pager of your @@ -1403,6 +1513,8 @@ choice by setting `diff.pager` configuration variable. For example, to use The pager can be disabled using the `--no-pager` flag or by setting `diff.pager` to an empty string. +--- + ### Use a custom diff tool By default, chezmoi uses a built-in diff. You can use a custom tool by setting @@ -1418,6 +1530,8 @@ specify: args = ["--diff", "{{ .Destination }}", "{{ .Target }}"] ``` +--- + ### Use a custom merge tool By default, chezmoi uses vimdiff. You can use a custom tool by setting the @@ -1433,8 +1547,12 @@ state, source state, and target state respectively. For example, to use args = ["-d", "{{ .Destination }}", "{{ .Source }}", "{{ .Target }}"] ``` +--- + ## Migrating to chezmoi from another dotfile manager +--- + ### Migrate from a dotfile manager that uses symlinks Many dotfile managers replace dotfiles with symbolic links to files in a common @@ -1451,6 +1569,8 @@ of the `~/.bashrc` symlink, rather than the symlink itself. When you run `chezmoi apply`, chezmoi will replace the `~/.bashrc` symlink with the file contents. +--- + ## Migrate away from chezmoi chezmoi provides several mechanisms to help you move to an alternative dotfile diff --git a/docs/INSTALL.md b/docs/INSTALL.md index a305ace193c..15934cdaea8 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -8,6 +8,8 @@ * [All pre-built Linux packages and binaries](#all-pre-built-linux-packages-and-binaries) * [From source](#from-source) +--- + ## One-line binary install Install the correct binary for your operating system and architecture in `./bin` @@ -44,6 +46,8 @@ Or on systems with Powershell, you can use one of the following command: '$params = "-?"', (iwr https://git.io/chezmoi.ps1).Content | powershell -c - ``` +--- + ## One-line package install Install chezmoi with a single command. @@ -63,6 +67,8 @@ Install chezmoi with a single command. | Windows | Chocolatey | `choco install chezmoi` | | FreeBSD | pkg | `pkg install chezmoi` | +--- + ## Pre-built Linux packages Download a package for your operating system and architecture and install it @@ -76,6 +82,8 @@ with your package manager. | OpenSUSE | `aarch64`, `armhfp`, `i686`, `ppc64`, `ppc64le`, `x86_64` | [`rpm`](https://github.com/twpayne/chezmoi/releases/latest) | | Ubuntu | `amd64`, `arm64`, `armel`, `i386`, `ppc64`, `ppc64le` | [`deb`](https://github.com/twpayne/chezmoi/releases/latest) | +--- + ## Pre-built binaries Download an archive for your operating system containing a pre-built binary, @@ -89,11 +97,15 @@ documentation, and shell completions. | OpenBSD | `amd64`, `arm`, `arm64`, `i386` | [`tar.gz`](https://github.com/twpayne/chezmoi/releases/latest) | | Windows | `amd64`, `arm`, `i386` | [`zip`](https://github.com/twpayne/chezmoi/releases/latest) | +--- + ## All pre-built Linux packages and binaries All pre-built binaries and packages can be found on the [chezmoi GitHub releases page](https://github.com/twpayne/chezmoi/releases/latest). +--- + ## From source Download, build, and install chezmoi for your system: @@ -103,3 +115,5 @@ $ go install github.com/twpayne/chezmoi@latest ``` Building chezmoi requires Go 1.17 or later. + +--- diff --git a/docs/MEDIA.md b/docs/MEDIA.md index e786a21f3f5..51eada9ee09 100644 --- a/docs/MEDIA.md +++ b/docs/MEDIA.md @@ -8,6 +8,8 @@ Recommended video: [chezmoi: manage your dotfiles across multiple, diverse machi Recommended podcast: [Managing Dot Files and an Introduction to Chezmoi](https://www.podfeet.com/blog/2021/07/ccatp-693/) +--- + | Date | Version | Format | Link | | ---------- | ------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | 2021-08-22 | 2.1.2 | Audio/text | [PBS 123 of X — Backing up and Syncing Dot Files with Chezmoi](https://pbs.bartificer.net/pbs123) | @@ -45,7 +47,11 @@ Recommended podcast: [Managing Dot Files and an Introduction to Chezmoi](https:/ | 2019-11-20 | 1.7.2 | Audio/video | [FLOSS weekly episode 556: chezmoi](https://twit.tv/shows/floss-weekly/episodes/556) | | 2019-01-10 | 0.0.11 | Text | [Linux Fu: The kitchen sync](https://hackaday.com/2019/01/10/linux-fu-the-kitchen-sync/) | +--- + To add your article to this page please either [open an issue](https://github.com/twpayne/chezmoi/issues/new/choose) or submit a pull request that modifies this file ([`docs/MEDIA.md`](https://github.com/twpayne/chezmoi/blob/master/docs/MEDIA.md)). + +--- diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md index d73ee8e7668..a7c9ba4cd15 100644 --- a/docs/QUICKSTART.md +++ b/docs/QUICKSTART.md @@ -6,6 +6,8 @@ * [Using chezmoi across multiple machines](#using-chezmoi-across-multiple-machines) * [Next steps](#next-steps) +--- + ## Concepts chezmoi stores the desired state of your dotfiles in the directory @@ -13,6 +15,8 @@ chezmoi stores the desired state of your dotfiles in the directory desired contents and permissions for each dotfile and then makes any changes necessary so that your dotfiles match that state. +--- + ## Start using chezmoi on your current machine Assuming that you have already [installed @@ -89,6 +93,8 @@ Finally, exit the shell in the source directory to return to where you were: $ exit ``` +--- + ## Using chezmoi across multiple machines On a second machine, initialize chezmoi with your dotfiles repo: @@ -118,6 +124,8 @@ On any machine, you can pull and apply the latest changes from your repo with: $ chezmoi update ``` +--- + ## Next steps For a full list of commands run: @@ -126,7 +134,10 @@ For a full list of commands run: $ chezmoi help ``` -chezmoi has much more functionality. Good starting points are adding more -dotfiles, and using templates to manage files that vary from machine to machine -and retrieve secrets from your password manager. Read the [how-to +chezmoi has much more functionality. Good starting points are reading [articles +about chezmoi](https://github.com/twpayne/chezmoi/blob/master/docs/MEDIA.md) +adding more dotfiles, and using templates to manage files that vary from machine +to machine and retrieve secrets from your password manager. Read the [how-to guide](https://github.com/twpayne/chezmoi/blob/master/docs/HOWTO.md) to explore. + +--- diff --git a/docs/REFERENCE.md b/docs/REFERENCE.md index 9c96cd6a4e5..f019ca3d973 100644 --- a/docs/REFERENCE.md +++ b/docs/REFERENCE.md @@ -123,6 +123,8 @@ Manage your dotfiles across multiple machines, securely. * [`vault` *key*](#vault-key) * [`writeToStdout` *string*...](#writetostdout-string) +--- + ## Concepts chezmoi evaluates the source state for the current machine and then updates the @@ -147,6 +149,8 @@ destination directory, where: * The *config file* contains machine-specific configuration, by default it is `~/.config/chezmoi/chezmoi.toml`. +--- + ## Global command line flags Command line flags override any values set in the configuration file. @@ -235,6 +239,8 @@ state and the destination set are printed as unified diffs. Print the version of chezmoi, the commit at which it was built, and the build timestamp. +--- + ## Common command line flags The following flags apply to multiple commands where they are relevant. @@ -275,7 +281,9 @@ Write a [Go CPU profile](https://blog.golang.org/pprof) to *filename*. Enable the [gops](https://github.com/google/gops) agent. - ## Configuration file + --- + +## Configuration file chezmoi searches for its configuration file according to the [XDG Base Directory Specification](https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) @@ -387,6 +395,8 @@ git: autoPush: true ``` +--- + ## Source state attributes chezmoi stores the source state of files, symbolic links, and directories in @@ -447,6 +457,8 @@ chezmoi ignores all files and directories in the source directory that begin with a `.` with the exception of files and directories that begin with `.chezmoi`. +--- + ## Target types chezmoi will create, update, and delete files, directories, and symbolic links @@ -455,6 +467,8 @@ performs actions in ASCII order of their target name. For example, given a file `dot_a`, a script `run_z`, and a directory `exact_dot_c`, chezmoi will first create `.a`, create `.c`, and then execute `run_z`. +--- + ### Files Files are represented by regular files in the source state. The `encrypted_` @@ -479,6 +493,8 @@ file. The contents of the existing file (which maybe empty if the existing file does not exist or is empty) are passed to the script's standard input, and the new contents are read from the scripts standard output. +--- + ### Directories Directories are represented by regular directories in the source state. The @@ -486,6 +502,8 @@ Directories are represented by regular directories in the source state. The are not explicitly specified in the source state, and the `private_` attribute causes chezmoi to clear all group and world permissions. +--- + ### Symbolic links Symbolic links are represented by regular files in the source state with the @@ -495,6 +513,8 @@ Symbolic links with the `.tmpl` suffix in the source state are interpreted as templates. If the target of the symbolic link is empty or consists only of whitespace, then the target is removed. +--- + ### Scripts Scripts are represented as regular files in the source state with prefix `run_`. @@ -553,6 +573,8 @@ If the script in the source state is a template (with a `.tmpl` extension), then chezmoi will strip the `.tmpl` extension and use the next remaining extension to determine the interpreter to use. +--- + ### `symlink` mode By default, chezmoi will create regular files and directories. Setting `mode = @@ -561,11 +583,15 @@ symlinks by default, i.e. `chezmoi apply` will make dotfiles symlinks to files in the source directory if the target is a regular file and is not encrypted, executable, private, or a template. +--- + ## Special files and directories All files and directories in the source state whose name begins with `.` are ignored by default, unless they are one of the special files listed here. +--- + ### `.chezmoi..tmpl` If a file called `.chezmoi..tmpl` exists then `chezmoi init` will use it @@ -580,6 +606,8 @@ data: email: {{ $email | quote }} ``` +--- + ### `.chezmoidata.` If a file called `.chezmoidata.` exists in the source state, it is interpreted @@ -618,6 +646,8 @@ MOVE_RIGHT=l MOVE_LEFT=h ``` +--- + ### `.chezmoiexternal.` If a file called `.chezmoiexternal.` exists in the source state, it is @@ -667,6 +697,8 @@ To force chezmoi to re-download URLs, pass the `--refresh-externals` flag. stripComponents = 1 ``` +--- + ### `.chezmoiignore` If a file called `.chezmoiignore` exists in the source state then it is @@ -708,12 +740,16 @@ backups/** # ignore all contents of backups folder in chezmoi directory {{- end }} ``` +--- + ### `.chezmoiremove` If a file called `.chezmoiremove` exists in the source state then it is interpreted as a list of targets to remove. `.chezmoiremove` is interpreted as a template. +--- + ### `.chezmoitemplates` If a directory called `.chezmoitemplates` exists, then all files in this @@ -741,6 +777,8 @@ Given: The target state of `.config` will be `bar`. +--- + ### `.chezmoiversion` If a file called `.chezmoiversion` exists, then its contents are interpreted as @@ -754,8 +792,12 @@ the current version is too old. 1.5.0 ``` +--- + ## Commands +--- + ### `add` *target*... Add *target*s to the source state. If any target is already in the source state, @@ -816,6 +858,8 @@ $ chezmoi add ~/.vim --recursive $ chezmoi add ~/.oh-my-zsh --exact --recursive ``` +--- + ### `apply` [*target*...] Ensure that *target*... are in the target state, updating them if necessary. If @@ -840,6 +884,8 @@ $ chezmoi apply --dry-run --verbose $ chezmoi apply ~/.bashrc ``` +--- + ### `archive` Generate an archive of the target state. This can be piped into `tar` to inspect @@ -865,6 +911,8 @@ $ chezmoi archive --output=dotfiles.tar $ chezmoi archive --format=zip --output=dotfiles.zip ``` +--- + ### `cat` *target*... Write the target contents of *target*s to stdout. *targets* must be files, @@ -878,6 +926,8 @@ written. $ chezmoi cat ~/.bashrc ``` +--- + ### `cd` Launch a shell in the source directory. chezmoi will launch the command set by @@ -891,6 +941,8 @@ will finally fall back to an OS-specific default. $ chezmoi cd ``` +--- + ### `chattr` *attributes* *target*... Change the attributes of *target*s. *attributes* specifies which attributes to @@ -924,6 +976,8 @@ $ chezmoi chattr private,template ~/.netrc $ chezmoi chattr -- -x ~/.zshrc ``` +--- + ### `completion` *shell* Generate shell completion code for the specified shell (`bash`, `fish`, @@ -936,6 +990,8 @@ $ chezmoi completion bash $ chezmoi completion fish --output=~/.config/fish/completions/chezmoi.fish ``` +--- + ### `data` Write the computed template data to stdout. @@ -951,6 +1007,8 @@ $ chezmoi data $ chezmoi data --format=yaml ``` +--- + ### `diff` [*target*...] Print the difference between the target state and the destination state for @@ -982,6 +1040,8 @@ $ chezmoi diff $ chezmoi diff ~/.bashrc ``` +--- + ### `docs` [*regexp*] Print the documentation page matching the regular expression *regexp*. Matching @@ -999,6 +1059,8 @@ $ chezmoi docs faq $ chezmoi docs howto ``` +--- + ### `doctor` Check for potential problems. @@ -1009,6 +1071,8 @@ Check for potential problems. $ chezmoi doctor ``` +--- + ### `dump` [*target*...] Dump the target state of *target*s. If no targets are specified, then the entire @@ -1029,6 +1093,8 @@ $ chezmoi dump ~/.bashrc $ chezmoi dump --format=yaml ``` +--- + ### `edit` [*target*...] Edit the source state of *target*s, which must be files or symlinks. If no @@ -1054,6 +1120,8 @@ $ chezmoi edit ~/.bashrc --apply $ chezmoi edit ``` +--- + ### `edit-config` Edit the configuration file. @@ -1064,6 +1132,8 @@ Edit the configuration file. $ chezmoi edit-config ``` +--- + ### `execute-template` [*template*...] Execute *template*s. This is useful for testing templates or for calling chezmoi @@ -1109,6 +1179,8 @@ $ echo '{{ .chezmoi | toJson }}' | chezmoi execute-template $ chezmoi execute-template --init --promptString email=me@home.org < ~/.local/share/chezmoi/.chezmoi.toml.tmpl ``` +--- + ### `forget` *targets* Remove *targets* from the source state, i.e. stop managing them. @@ -1119,6 +1191,8 @@ Remove *targets* from the source state, i.e. stop managing them. $ chezmoi forget ~/.bashrc ``` +--- + ### `git` [*arg*...] Run `git` *arg*s in the source directory. Note that flags in *arguments* must @@ -1132,11 +1206,15 @@ $ chezmoi git add dot_gitconfig $ chezmoi git -- commit -m "Add .gitconfig" ``` +--- + ### `help` [*command*...] Print the help associated with *command*, or general help if no command is given. +--- + ### `init` [*repo*] Setup the source directory, generate the config file, and optionally update the @@ -1219,6 +1297,8 @@ $ chezmoi init user/dots $ chezmoi init gitlab.com/user ``` +--- + ### `import` *filename* Import the source state from an archive file in to a directory in the source @@ -1253,10 +1333,14 @@ $ mkdir -p $(chezmoi source-path)/dot_oh-my-zsh $ chezmoi import --strip-components 1 --destination ~/.oh-my-zsh ${TMPDIR}/oh-my-zsh-master.tar.gz ``` +--- + ### `manage` *targets* `manage` is an alias for `add` for symmetry with `unmanage`. +--- + ### `managed` List all managed entries in the destination directory in alphabetical order. @@ -1275,6 +1359,8 @@ $ chezmoi managed -i d $ chezmoi managed -i d,f ``` +--- + ### `merge` *target*... Perform a three-way merge between the destination state, the target state, and @@ -1298,6 +1384,8 @@ default value of `merge.args` is `["{{ .Destination }}", "{{ .Source }}", "{{ $ chezmoi merge ~/.bashrc ``` +--- + ### `purge` Remove chezmoi's configuration, state, and source directory, but leave the @@ -1314,6 +1402,8 @@ $ chezmoi purge $ chezmoi purge --force ``` +--- + ### `remove` *targets* Remove *targets* from both the source state and the destination directory. @@ -1322,6 +1412,8 @@ Remove *targets* from both the source state and the destination directory. Remove without prompting. +--- + ### `re-add` Re-add all modified files in the target state. chezmoi will not overwrite @@ -1337,6 +1429,8 @@ $ chezmoi re-add `rm` is an alias for `remove`. +--- + ### `secret` Run a secret manager's CLI, passing any extra arguments to the secret manager's @@ -1358,6 +1452,8 @@ $ chezmoi secret keyring set --service=service --user=user --value=password $ chezmoi secret keyring get --service=service --user=user ``` +--- + ### `source-path` [*target*...] Print the path to each target's source state. If no targets are specified then @@ -1370,6 +1466,8 @@ $ chezmoi source-path $ chezmoi source-path ~/.bashrc ``` +--- + ### `state` Manipulate the persistent state. @@ -1385,6 +1483,8 @@ $ chezmoi state set --bucket=bucket --key=key --value=value $ chezmoi state reset ``` +--- + ### `status` Print the status of the files and scripts managed by chezmoi in a format similar @@ -1404,6 +1504,8 @@ Only include entries of type *types*. $ chezmoi status ``` +--- + ### `unmanage` *target*... `unmanage` is an alias for `forget` for symmetry with `manage`. @@ -1418,6 +1520,8 @@ List all unmanaged files in the destination directory. $ chezmoi unmanaged ``` +--- + ### `update` Pull changes from the source repo and apply any changes. @@ -1432,6 +1536,8 @@ Only update entries of type *types*. $ chezmoi update ``` +--- + ### `upgrade` Upgrade chezmoi by downloading and installing the latest released version. This @@ -1446,6 +1552,8 @@ requests are used which are subject to stricter [rate limiting](https://developer.github.com/v3/#rate-limiting). Unauthenticated requests should be sufficient for most cases. +--- + ### `verify` [*target*...] Verify that all *target*s match their target state. chezmoi exits with code 0 @@ -1463,12 +1571,16 @@ $ chezmoi verify $ chezmoi verify ~/.bashrc ``` +--- + ## Editor configuration The `edit` and `edit-config` commands use the editor specified by the `VISUAL` environment variable, the `$EDITOR` environment variable, or `vi`, whichever is specified first. +--- + ## Umask configuration By default, chezmoi uses your current umask as set by your operating system and @@ -1483,6 +1595,8 @@ chezmoi's configuration file, for example: umask = 0o22 ``` +--- + ## Template execution chezmoi executes templates using @@ -1512,6 +1626,8 @@ overridden by setting a list of options in the configuration file, for example: For a full list of options, see [`Template.Option`](https://pkg.go.dev/text/template?tab=doc#Template.Option). +--- + ## Template variables chezmoi provides the following automatically-populated variables: @@ -1535,12 +1651,16 @@ Additional variables can be defined in the config file in the `data` section. Variable names must consist of a letter and be followed by zero or more letters and/or digits. +--- + ## Template functions All standard [`text/template`](https://pkg.go.dev/text/template) and [text template functions from `sprig`](http://masterminds.github.io/sprig/) are included. chezmoi provides some additional functions. +--- + ### `bitwarden` [*arg*...] `bitwarden` returns structured data retrieved from @@ -1557,6 +1677,8 @@ username = {{ (bitwarden "item" "").login.username }} password = {{ (bitwarden "item" "").login.password }} ``` +--- + ### `bitwardenAttachment` *filename* *itemid* `bitwardenAttachment` returns a document from @@ -1573,6 +1695,8 @@ only invoke `bw` once. {{- (bitwardenAttachment "" "") -}} ``` +--- + ### `bitwardenFields` [*arg*...] `bitwardenFields` returns structured data retrieved from @@ -1641,6 +1765,8 @@ the same arguments will only invoke `bw get` once. {{ (bitwardenFields "item" "").token.value }} ``` +--- + ### `gitHubKeys` *user* `gitHubKeys` returns *user*'s public SSH keys from GitHub using the GitHub API. @@ -1676,6 +1802,8 @@ token](https://docs.github.com/en/github/authenticating-to-github/creating-a-per {{ end }} ``` +--- + ### `gopass` *gopass-name* `gopass` returns passwords stored in [gopass](https://www.gopass.pw/) using the @@ -1691,6 +1819,8 @@ once. {{ gopass "" }} ``` +--- + ### `gopassRaw` *gopass-name* `gopass` returns passwords stored in [gopass](https://www.gopass.pw/) using the @@ -1699,11 +1829,15 @@ and output of `gopass` is returned. The output from `gopassRaw` is cached so calling `gopassRaw` multiple times with the same *gopass-name* will only invoke `gopass` once. +--- + ### `include` *filename* `include` returns the literal contents of the file named `*filename*`. Relative paths are interpreted relative to the source directory. +--- + ### `ioreg` On macOS, `ioreg` returns the structured output of the `ioreg -a -l` command, @@ -1722,6 +1856,8 @@ only execute the `ioreg -a -l` command once. {{ end }} ``` +--- + ### `joinPath` *element*... `joinPath` joins any number of path elements into a single path, separating them @@ -1736,6 +1872,8 @@ first non-empty element is a UNC path. {{ joinPath .chezmoi.homeDir ".zshrc" }} ``` +--- + ### `keepassxc` *entry* `keepassxc` returns structured data retrieved from a @@ -1755,6 +1893,8 @@ username = {{ (keepassxc "example.com").UserName }} password = {{ (keepassxc "example.com").Password }} ``` +--- + ### `keepassxcAttribute` *entry* *attribute* `keepassxcAttribute` returns the attribute *attribute* of *entry* using @@ -1768,6 +1908,8 @@ prompting, password storage, and result caching. {{ keepassxcAttribute "SSH Key" "private-key" }} ``` +--- + ### `keyring` *service* *user* `keyring` retrieves the value associated with *service* and *user* from the @@ -1787,6 +1929,8 @@ user's keyring. token = {{ keyring "github" .github.user | quote }} ``` +--- + ### `lastpass` *id* `lastpass` returns structured data from [LastPass](https://lastpass.com) using @@ -1805,6 +1949,8 @@ githubPassword = {{ (index (lastpass "GitHub") 0).password | quote }} {{ (index (lastpass "SSH") 0).note.privateKey }} ``` +--- + ### `lastpassRaw` *id* `lastpassRaw` returns structured data from [LastPass](https://lastpass.com) @@ -1818,6 +1964,8 @@ further parsing is done on the `note` field. {{ (index (lastpassRaw "SSH Private Key") 0).note }} ``` +--- + ### `lookPath` *file* `lookPath` searches for an executable named *file* in the directories named by @@ -1838,11 +1986,15 @@ caution when using it in your templates. {{ end }} ``` +--- + ### `mozillaInstallHash` *path* `mozillaInstallHash` returns the Mozilla install hash for *path*. This is a convenience function to assist the management of Firefox profiles. +--- + ### `onepassword` *uuid* [*vault-uuid* [*account-name*]] `onepassword` returns structured data from [1Password](https://1password.com/) @@ -1865,6 +2017,8 @@ in case you have multiple accounts (eg. personal and work accounts). {{ (onepassword "" "" "").details.password }} ``` +--- + ### `onepasswordDocument` *uuid* [*vault-uuid* [*account-name*]] `onepassword` returns a document from [1Password](https://1password.com/) using @@ -1887,6 +2041,8 @@ accounts). {{- onepasswordDocument "" "" "" -}} ``` +--- + ### `onepasswordDetailsFields` *uuid* [*vault-uuid* [*account-name*]] `onepasswordDetailsFields` returns structured data from @@ -1954,6 +2110,8 @@ accounts). {{ (onepasswordDetailsFields "" "" "").password.value }} ``` +--- + ### `output` *name* [*arg*...] `output` returns the output of executing the command *name* with *arg*s. If @@ -1968,6 +2126,8 @@ and fast. current-context: {{ output "kubectl" "config" "current-context" | trim }} ``` +--- + ### `pass` *pass-name* `pass` returns passwords stored in [pass](https://www.passwordstore.org/) using @@ -1982,6 +2142,8 @@ the same *pass-name* will only invoke `pass` once. {{ pass "" }} ``` +--- + ### `passRaw` *pass-name* `passRaw` returns passwords stored in [pass](https://www.passwordstore.org/) @@ -1989,6 +2151,8 @@ using the pass CLI (`pass`). *pass-name* is passed to `pass show ` and the output is returned. The output from `pass` is cached so calling `passRaw` multiple times with the same *pass-name* will only invoke `pass` once. +--- + ### `promptBool` *prompt* `promptBool` prompts the user with *prompt* and returns the user's response with @@ -2000,12 +2164,16 @@ config file. The user's response is interpreted as follows (case insensitive): | 1, on, t, true, y, yes | `true` | | 0, off, f, false, n, no | `false` | +--- + ### `promptInt` *prompt* `promptInt` prompts the user with *prompt* and returns the user's response with interpreted as an integer. It is only available when generating the initial config file. +--- + ### `promptString` *prompt* `promptString` prompts the user with *prompt* and returns the user's response @@ -2020,6 +2188,8 @@ generating the initial config file. email = {{ $email | quote }} ``` +--- + ### `secret` [*arg*...] `secret` returns the output of the generic secret command defined by the @@ -2027,6 +2197,8 @@ generating the initial config file. whitespace removed. The output is cached so multiple calls to `secret` with the same *arg*s will only invoke the generic secret command once. +--- + ### `secretJSON` [*arg*...] `secretJSON` returns structured data from the generic secret command defined by @@ -2034,6 +2206,8 @@ the `secret.command` configuration variable with *arg*s. The output is parsed as JSON. The output is cached so multiple calls to `secret` with the same *args* will only invoke the generic secret command once. +--- + ### `stat` *name* `stat` runs `stat(2)` on *name*. If *name* exists it returns structured data. If @@ -2054,6 +2228,8 @@ templates. {{ end }} ``` +--- + ### `stdinIsATTY` `stdinIsATTY` returns `true` if chezmoi's standard input is a TTY. It is only @@ -2072,6 +2248,8 @@ used. {{ end }} ``` +--- + ### `vault` *key* `vault` returns structured data from [Vault](https://www.vaultproject.io/) using @@ -2086,6 +2264,8 @@ times with the same *key* will only invoke `vault` once. {{ (vault "").data.data.password }} ``` +--- + ### `writeToStdout` *string*... `writeToStdout` writes each *string* to stdout. It is only available when diff --git a/docs/RELATED.md b/docs/RELATED.md index 4a67660d011..73d3d50aeb5 100644 --- a/docs/RELATED.md +++ b/docs/RELATED.md @@ -7,24 +7,36 @@ * [`github.com/tuh8888/chezmoi.el`](#githubcomtuh8888chezmoiel) * [`github.com/Lilja/vim-chezmoi`](#githubcomliljavim-chezmoi) +--- + ## [`github.com/alker0/chezmoi.vim`](https://github.com/alker0/chezmoi.vim) Intelligent VIM syntax highlighting when editing files in your source directory. Works with both `chezmoi edit` and editing files directly. +--- + ## [`github.com/hussainweb/ansible-role-chezmoi`](https://github.com/hussainweb/ansible-role-chezmoi) Installs chezmoi on Ubuntu and Debian servers. +--- + ## [`github.com/tcaxle/drapeau`](https://github.com/tcaxle/drapeau) An add-on to synchronise your colorschemes across systems and allow easy colorscheme switching using chezmoi templates. +--- + ## [`github.com/tuh8888/chezmoi.el`](https://github.com/tuh8888/chezmoi.el) Convenience functions for interacting with chezmoi in Emacs. +--- + ## [`github.com/Lilja/vim-chezmoi`](https://github.com/Lilja/vim-chezmoi) A plugin for VIM to apply the dotfile you are editing on `:w`. + +--- diff --git a/docs/SECURITY.md b/docs/SECURITY.md index 6881bcb63fb..a3dc855c5c5 100644 --- a/docs/SECURITY.md +++ b/docs/SECURITY.md @@ -4,12 +4,18 @@ * [Supported versions](#supported-versions) * [Reporting a vulnerability](#reporting-a-vulnerability) +--- + ## Supported versions Only the most recent version of chezmoi is supported with security updates. +--- + ## Reporting a vulnerability Please report vulnerabilities by [opening a GitHub issue](https://github.com/twpayne/chezmoi/issues/new/choose) or sending an email to twpayne+chezmoi-security@gmail.com. + +--- diff --git a/docs/TEMPLATING.md b/docs/TEMPLATING.md index 534743dde49..ad8bced9421 100644 --- a/docs/TEMPLATING.md +++ b/docs/TEMPLATING.md @@ -20,6 +20,8 @@ * [Using `.chezmoitemplates` for creating similar files](#using-chezmoitemplates-for-creating-similar-files) * [Passing multiple arguments](#passing-multiple-arguments) +--- + ## Introduction Templates are used to change the contents of a file depending on the @@ -37,6 +39,8 @@ if either of the following is true: * The file is in the `.chezmoitemplates` directory, or a subdirectory of `.chezmoitemplates`. +--- + ## Template data chezmoi provides a variety of template variables. For a full list, run @@ -56,6 +60,8 @@ These come from a variety of sources (later data overwrite earlier ones): Furthermore, chezmoi provides a variety of functions to retrieve data at runtime from password managers, environment variables, and the filesystem. +--- + ## Creating a template file There are several ways to create a template: @@ -96,6 +102,8 @@ $ $EDITOR dot_zshrc.tmpl cd .chezmoitemplates $EDITOR mytemplate +--- + ## Editing a template file The easiest way to edit a template is to use `chezmoi edit`, for example: @@ -114,6 +122,8 @@ editor, use the `--apply` option, for example: $ chezmoi edit --apply ~/.zshrc ``` +--- + ## Testing templates Templates can be tested with the `chezmoi execute-template` command which treats @@ -132,6 +142,8 @@ $ chezmoi cd $ chezmoi execute-template < dot_zshrc.tmpl ``` +--- + ## Template syntax Template actions are written inside double curly brackets, `{{` and `}}`. @@ -160,6 +172,8 @@ for example: For a full description of the template syntax, see the [`text/template` documentation](https://pkg.go.dev/text/template). +--- + ### Removing whitespace For formatting reasons you might want to leave some whitespace after or before @@ -183,6 +197,8 @@ HOSTNAME=myhostname Notice that this will remove any number of tabs, spaces and even newlines and carriage returns. +--- + ## Debugging templates If there is a mistake in one of your templates and you want to debug it, chezmoi @@ -206,6 +222,8 @@ You can also feed the contents of a file to this command by typing: $ cat foo.txt | chezmoi execute-template ``` +--- + ## Simple logic A very useful feature of chezmoi templates is the ability to perform logical @@ -225,6 +243,8 @@ In this example chezmoi will look at the hostname of the machine and if that is equal to "work-laptop", the text between the `if` and the `end` will be included in the result. +--- + ### Boolean functions | Function | Return value | @@ -234,6 +254,8 @@ in the result. | `and` | Returns the boolean AND of its arguments by returning the first empty argument or the last argument, that is, `and x y` behaves as `if x then y else x`. All the arguments are evaluated. | | `or` | Returns the boolean OR of its arguments by returning the first non-empty argument or the last argument, that is, `or x y` behaves as `if x then x else y` All the arguments are evaluated. | +--- + ### Integer functions | Function | Return value | @@ -246,6 +268,8 @@ in the result. | `gt` | Returns the boolean truth of arg1 > arg2. | | `ge` | Returns the boolean truth of arg1 >= arg2. | +--- + ## More complicated logic Up until now, we have only seen if statements that can handle at most two @@ -266,6 +290,8 @@ nothing. The operators `or` and `and` can also accept multiple arguments. +--- + ### Chaining operators You can perform multiple checks in one if statement. @@ -282,6 +308,8 @@ arguments will be give to the `and` command. This way you can chain as many operators together as you like. +--- + ## Helper functions chezmoi has added multiple helper functions to the @@ -294,6 +322,8 @@ their documentation for a list. chezmoi adds a few functions of its own as well. Take a look at the [`reference`](REFERENCE.md#template-functions) for complete list. +--- + ## Template variables chezmoi defines a few useful templates variables that depend on the system you @@ -316,6 +346,8 @@ This outputs the variables in JSON format by default. To access the variable This way you can also access the variables you defined yourself. +--- + ## Using `.chezmoitemplates` Files in the `.chezmoitemplates` subdirectory are parsed as templates and are @@ -341,6 +373,8 @@ dot_file.tmpl: {{ template "part.tmpl" . }} ``` +--- + ## Using `.chezmoitemplates` for creating similar files When you have multiple similar files, but they aren't quite the same, you can @@ -384,11 +418,15 @@ fontsize: 18 more: config ``` +--- + ### Passing multiple arguments In the example above only one arguments is passed to the template. To pass more arguments to the template, you can do it in two ways. +--- + #### Via the config file This method is useful if you want to use the same template arguments multiple @@ -422,6 +460,8 @@ And connect them with `.local/share/chezmoi/small-font.yml.tmpl`: At the moment, this means that you'll have to duplicate the alacritty data in the config file on every machine, but a feature will be added to avoid this. +--- + #### By passing a dictionary Using the same alacritty configuration as above, you can pass the arguments to @@ -430,3 +470,5 @@ it with a dictionary, for example `.local/share/chezmoi/small-font.yml.tmpl`: ``` {{- template "alacritty" dict "fontsize" 12 "font" "DejaVu Sans Mono" -}} ``` + +--- diff --git a/go.mod b/go.mod index 9a6a2d75cfd..694269e76c5 100644 --- a/go.mod +++ b/go.mod @@ -12,9 +12,9 @@ require ( github.com/bradenhilton/mozillainstallhash v1.0.0 github.com/charmbracelet/glamour v0.3.0 github.com/coreos/go-semver v0.3.0 - github.com/danieljoos/wincred v1.1.1 // indirect + github.com/danieljoos/wincred v1.1.2 // indirect github.com/go-git/go-git/v5 v5.4.2 - github.com/google/go-github/v36 v36.0.0 + github.com/google/go-github/v38 v38.1.0 github.com/google/go-querystring v1.1.0 // indirect github.com/google/gops v0.3.19 github.com/google/renameio v1.0.1 @@ -30,11 +30,11 @@ require ( github.com/muesli/termenv v0.9.0 // indirect github.com/pelletier/go-toml v1.9.3 github.com/rogpeppe/go-internal v1.8.0 - github.com/rs/zerolog v1.23.0 + github.com/rs/zerolog v1.24.0 github.com/sergi/go-diff v1.1.0 github.com/smartystreets/assertions v1.2.0 // indirect github.com/spf13/afero v1.6.0 - github.com/spf13/cast v1.4.0 // indirect + github.com/spf13/cast v1.4.1 // indirect github.com/spf13/cobra v1.2.1 github.com/spf13/viper v1.8.1 github.com/stretchr/testify v1.7.0 @@ -47,9 +47,9 @@ require ( go.etcd.io/bbolt v1.3.6 go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.7.0 - golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985 // indirect - golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 - golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c + golang.org/x/net v0.0.0-20210825183410-e898025ed96a // indirect + golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f + golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b google.golang.org/protobuf v1.27.1 // indirect gopkg.in/yaml.v2 v2.4.0 @@ -68,7 +68,7 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/dlclark/regexp2 v1.4.0 // indirect github.com/emirpasic/gods v1.12.0 // indirect - github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/fsnotify/fsnotify v1.5.1 // indirect github.com/go-git/gcfg v1.5.0 // indirect github.com/go-git/go-billy/v5 v5.3.1 // indirect github.com/godbus/dbus/v5 v5.0.4 // indirect @@ -92,10 +92,11 @@ require ( github.com/shopspring/decimal v1.2.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/stretchr/objx v0.3.0 // indirect github.com/subosito/gotenv v1.2.0 // indirect github.com/yuin/goldmark-emoji v1.0.1 // indirect - golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 // indirect - golang.org/x/text v0.3.6 // indirect + golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 // indirect + golang.org/x/text v0.3.7 // indirect google.golang.org/appengine v1.6.7 // indirect gopkg.in/errgo.v2 v2.1.0 // indirect gopkg.in/ini.v1 v1.62.0 // indirect diff --git a/go.sum b/go.sum index ffbad023bd8..8118c6c595f 100644 --- a/go.sum +++ b/go.sum @@ -17,36 +17,27 @@ cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKP cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= -cloud.google.com/go v0.81.0 h1:at8Tk2zUz63cLPR0JPWm5vp77pEZmzxEQBEfRKn1VV8= cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= -cloud.google.com/go/bigquery v1.8.0 h1:PQcPefKFdaIzjQFbiyOgAqyx8q5djaE7x9Sqe712DPA= cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= -cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= -cloud.google.com/go/firestore v1.1.0 h1:9x7Bx0A9R5/M9jibeJeZWqjeVEIxYW9fZYqB9a70/bY= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= -cloud.google.com/go/pubsub v1.3.1 h1:ukjixP1wl0LpnZ6LWtZJ0mX5tBmjp1f8Sqer8Z2OMUU= cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= -cloud.google.com/go/storage v1.10.0 h1:STgFzyU5/8miMl0//zKh2aQeTyeaUH3WN9bSUiJ09bA= cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI= github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= @@ -61,7 +52,6 @@ github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpz github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= github.com/ProtonMail/go-crypto v0.0.0-20210707164159-52430bf6b52c h1:FP7mMdsXy0ybzar1sJeIcZtaJka0U/ZmLTW4wRpolYk= github.com/ProtonMail/go-crypto v0.0.0-20210707164159-52430bf6b52c/go.mod h1:z4/9nQmJSSwwds7ejkxaJwO37dru3geImFUdJlaLzQo= -github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d h1:G0m3OIz70MZUWq3EgK3CesDbo8upS2Vm9/P3FtgI+Jk= github.com/StackExchange/wmi v0.0.0-20190523213315-cbe66965904d/go.mod h1:3eOhrUMpNV+6aFIbp5/iudMxNCF27Vw2OZgy4xEx0Fg= github.com/acomagu/bufpipe v1.0.3 h1:fxAGrHZTgQ9w5QqVItgzwj235/uYZYgbXitB+dLupOk= github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= @@ -73,30 +63,22 @@ github.com/alecthomas/chroma v0.9.2/go.mod h1:eMuEnpA18XbG/WhOWtCzJHS7WqEtDAI+Hx github.com/alecthomas/colour v0.0.0-20160524082231-60882d9e2721/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= github.com/alecthomas/colour v0.1.0 h1:nOE9rJm6dsZ66RGWYSFrXw461ZIt9A6+nHgL7FRrDUk= github.com/alecthomas/colour v0.1.0/go.mod h1:QO9JBoKquHd+jz9nshCh40fOfO+JzsoXy8qTHF68zU0= -github.com/alecthomas/kong v0.2.4 h1:Y0ZBCHAvHhTHw7FFJ2FzCAAG4pkbTgA45nc7BpMhDNk= github.com/alecthomas/kong v0.2.4/go.mod h1:kQOmtJgV+Lb4aj+I2LEn40cbtawdWJ9Y8QLq+lElKxE= github.com/alecthomas/repr v0.0.0-20180818092828-117648cd9897/go.mod h1:xTS7Pm1pD1mvyM075QCDSRqH6qRLXylzS24ZTpRiSzQ= github.com/alecthomas/repr v0.0.0-20201120212035-bb82daffcca2 h1:G5TeG64Ox4OWq2YwlsxS7nOedU8vbGgNRTRDAjGvDCk= github.com/alecthomas/repr v0.0.0-20201120212035-bb82daffcca2/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA= github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c= -github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= -github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da h1:8GUt8eRujhVEGZFFEjBj46YV4rDjvGrNxb0KMWYkL2I= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio= github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs= -github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d h1:Byv0BzEl3/e6D5CLfI0j/7hiIEtvGVFPCZ7Ei2oq8iQ= github.com/asaskevich/govalidator v0.0.0-20210307081110-f21760c49a8d/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw= github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= -github.com/bgentry/speakeasy v0.1.0 h1:ByYyxL9InA1OWqxJqqp2A5pYHUrCiAL6K3J+LKSsQkY= github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= -github.com/bketelsen/crypt v0.0.4 h1:w/jqZtC9YD4DS/Vp9GhWfWcCpuAL58oTnLoI8vE9YHU= github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= github.com/bmatcuk/doublestar/v4 v4.0.2 h1:X0krlUVAVmtr2cRoTqR8aDMrDqnB36ht8wpWTiQ3jsA= github.com/bmatcuk/doublestar/v4 v4.0.2/go.mod h1:xBQ8jztBU6kakFMg+8WGxn0c6z1fTSPVIjEY1Wr7jzc= @@ -104,33 +86,24 @@ github.com/bradenhilton/cityhash v1.0.0 h1:1QauDCwfxwIGwO2jBTJdEBqXgfCusAgQOSgdl github.com/bradenhilton/cityhash v1.0.0/go.mod h1:Wmb8yW1egA9ulrsRX4mxfYx5zq4nBWOCZ+j63oK6uz8= github.com/bradenhilton/mozillainstallhash v1.0.0 h1:QL9byVGb4FrVOI7MubnME3uPNj5R78tqYQPlxuBmXMw= github.com/bradenhilton/mozillainstallhash v1.0.0/go.mod h1:yVD0OX1izZHYl1lBm2UDojyE/k0xIqKJK78k+tdWV+k= -github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/charmbracelet/glamour v0.3.0 h1:3H+ZrKlSg8s+WU6V7eF2eRVYt8lCueffbi7r2+ffGkc= github.com/charmbracelet/glamour v0.3.0/go.mod h1:TzF0koPZhqq0YVBNL100cPHznAAjVj7fksX2RInwjGw= -github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= -github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= -github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= -github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= -github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403 h1:cqQfy1jclcSy/FwLjemeg3SR1yaINm74aQyupQ0Bl8M= github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI= github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM= github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/danieljoos/wincred v1.1.0/go.mod h1:XYlo+eRTsVA9aHGp7NGjFkPla4m+DCL7hqDjlFjiygg= -github.com/danieljoos/wincred v1.1.1 h1:FgOybUqUGGwgBz+ga92qD4f/ZPvuPryRjashrk/p9IA= -github.com/danieljoos/wincred v1.1.1/go.mod h1:gSBQmTx6G0VmLowygiA7ZD0p0E09HJ68vta8z/RT2d0= +github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= +github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -146,17 +119,13 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d h1:QyzYnTnPE15SQyUeqU6qLbWxMkwyAyu+vGksa0b7j00= github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= -github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/fatih/color v1.7.0 h1:DkWD4oS2D8LGGgTQ6IvwJJXSL5Vp2ffcQg58nFV38Ys= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= -github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ= github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= +github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= +github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0= github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= @@ -169,23 +138,17 @@ github.com/go-git/go-git-fixtures/v4 v4.2.1 h1:n9gGL1Ct/yIw+nfsfr8s4+sbhT+Ncu2Su github.com/go-git/go-git-fixtures/v4 v4.2.1/go.mod h1:K8zd3kDUAykwTdDCr+I0per6Y6vMiRR/nnVTBtavnB0= github.com/go-git/go-git/v5 v5.4.2 h1:BXyZu9t0VkbiHtqrsvdq39UDhGJTl1h55VW6CSC4aY4= github.com/go-git/go-git/v5 v5.4.2/go.mod h1:gQ1kArt6d+n+BGd+/B/I74HwRTLhth2+zti4ihgckDc= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= -github.com/go-ole/go-ole v1.2.4 h1:nNBDSCOigTSiarFpYE9J/KtEA1IOW4CNeqT9TQDqCxI= github.com/go-ole/go-ole v1.2.4/go.mod h1:XCwSNxSkXRo4vlyPy93sltvi/qJq0jqQhjqQNIwKuxM= github.com/godbus/dbus/v5 v5.0.3/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= -github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e h1:1r7pUrabqp18hOBcwBwiTsbnFeTZHV9eER/QT5JVZxY= github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= @@ -194,7 +157,6 @@ github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= -github.com/golang/mock v1.5.0 h1:jlYHihg//f7RRwuPfptm04yp4s7O6Kw8EZiVYIGcH0g= github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -215,7 +177,6 @@ github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -230,19 +191,16 @@ github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ= github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-github/v36 v36.0.0 h1:ndCzM616/oijwufI7nBRa+5eZHLldT+4yIB68ib5ogs= -github.com/google/go-github/v36 v36.0.0/go.mod h1:LFlKC047IOqiglRGNqNb9s/iAPTnnjtlshm+bxp+kwk= +github.com/google/go-github/v38 v38.1.0 h1:C6h1FkaITcBFK7gAmq4eFzt6gbhEhk7L5z6R3Uva+po= +github.com/google/go-github/v38 v38.1.0/go.mod h1:cStvrz/7nFr0FoENgG6GLbp53WaelXucT+BBz/3VKx4= github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck= github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= -github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw= github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/gops v0.3.19 h1:TeCprhFxawSc+HmdeGVUl5ZZWydf54Eozm5zlBCO+to= github.com/google/gops v0.3.19/go.mod h1:u2avozJYK46ijzYmpSTUmISEu0tcak5gXScMQLCb4pc= -github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= -github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60= github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= @@ -254,7 +212,6 @@ github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hf github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= -github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5 h1:zIaiqGYDQwa4HVx5wGRTXbx38Pqxjemn4BP98wpzpXo= github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/renameio v1.0.1 h1:Lh/jXZmvZxb0BBeSY5VKEfidcbcbenKjZFzM/q0fSeU= @@ -264,58 +221,38 @@ github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+ github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= -github.com/googleapis/gax-go/v2 v2.0.5 h1:sjZBwGj9Jlw33ImPtvFviGYvseOtDM7hkSKB7+Tv3SM= github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 h1:l5lAOZEym3oK3SQ2HBHWsJUfbNBiTXJDeW2QDxw9AQ0= github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= -github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= -github.com/hashicorp/consul/api v1.1.0 h1:BNQPM9ytxj6jbjjdRPioQ94T6YXriSopn0i8COv6SRA= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= -github.com/hashicorp/consul/sdk v0.1.1 h1:LnuDWGNsoajlhGyHJvuWW6FVqRl8JOTPqS6CPTsYjhY= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= -github.com/hashicorp/go-cleanhttp v0.5.1 h1:dH3aiDG9Jvb5r5+bYHsikaOUIpcM0xvgMXVoDkXMzJM= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= -github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= -github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= -github.com/hashicorp/go-multierror v1.0.0 h1:iVjPR7a6H0tWELX5NxNe7bYopibicUzc7uPribsnS6o= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= -github.com/hashicorp/go-rootcerts v1.0.0 h1:Rqb66Oo1X/eSV1x66xbDccZjhJigjg0+e82kpwzSwCI= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= -github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= -github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-uuid v1.0.1 h1:fv1ep09latC32wFoVwnqcnKJGnMSdBanPczbHAYm1BE= github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= -github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= -github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= -github.com/hashicorp/serf v0.8.2 h1:YZ7UKsJv+hKjqGVUUbtE3HNj79Eln2oQ75tniF6iPt0= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/huandu/xstrings v1.3.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/huandu/xstrings v1.3.2 h1:L18LIDzqlW6xN2rEkpdV8+oL/IXWJ1APd+vsdYy4Wdw= github.com/huandu/xstrings v1.3.2/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE= github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 h1:mV02weKRL81bEnm8A0HT1/CAelMQDBuQIfLw8n+d6xI= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= @@ -325,32 +262,23 @@ github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANyt github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= -github.com/jessevdk/go-flags v1.5.0 h1:1jKYvbxEjfUl0fmqTCOfonvskHHXMjBySTLW4y9LFvc= github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4= -github.com/json-iterator/go v1.1.11 h1:uVUAXhF2To8cbw/3xN3pxj6kk7TYKs98NIrTqPlMWAQ= github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kevinburke/ssh_config v1.1.0 h1:pH/t1WS9NzT8go394IqZeJTMHVm6Cr6ZJ6AQ+mdNo/o= github.com/kevinburke/ssh_config v1.1.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19 h1:WjT3fLi9n8YWh/Ih8Q1LHAPsTqGddPcHqscN+PJ3i68= github.com/keybase/go-ps v0.0.0-20190827175125-91aafc93ba19/go.mod h1:hY+WOq6m2FpbvyrI93sMaypsttvaIL5nhVR92dTMUcQ= -github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= -github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI= github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= -github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -362,7 +290,6 @@ github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPK github.com/matryer/is v1.2.0 h1:92UTHpy8CDwaJ08GqLDzhhuixiBUUD1p3AU6PHddz4A= github.com/matryer/is v1.2.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= -github.com/mattn/go-colorable v0.1.6 h1:6Su7aK7lXmJ/U79bYtBjLNaha4Fs1Rg9plHpcH+vvnE= github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= @@ -376,9 +303,7 @@ github.com/mattn/go-runewidth v0.0.13/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh github.com/microcosm-cc/bluemonday v1.0.6/go.mod h1:HOT/6NaBlR0f9XlxD3zolN6Z3N8Lp4pvhp+jLS5ihnI= github.com/microcosm-cc/bluemonday v1.0.15 h1:J4uN+qPng9rvkBZBoBb8YGR+ijuklIMpSOZZLjYpbeY= github.com/microcosm-cc/bluemonday v1.0.15/go.mod h1:ZLvAzeakRwrGnzQEvstVzVt3ZpqOF2+sdFr0Om+ce30= -github.com/miekg/dns v1.0.14 h1:9jZdLNd/P4+SfEJ0TNyxYpsK8N4GtfylBLqtbYN1sbA= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= @@ -386,11 +311,8 @@ github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HK github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= -github.com/mitchellh/go-testing-interface v1.0.0 h1:fzU/JVNcaqHQEcVFAKeR41fkiLdIPrefOvVG1VZ96U0= github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= -github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= -github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= @@ -399,10 +321,8 @@ github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RR github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 h1:ZqeYNhU3OHLH3mGKHDcjJRFFRrJa6eAM5H+CtDdOsPc= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= -github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI= github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/muesli/combinator v0.3.0 h1:SZDuRzzwmVPLkbOzbhGzBTwd5+Y6aFN4UusOW2azrNA= github.com/muesli/combinator v0.3.0/go.mod h1:ttPegJX0DPQaGDtJKMInIP6Vfp5pN8RX7QntFCcpy18= @@ -412,11 +332,9 @@ github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKt github.com/muesli/termenv v0.8.1/go.mod h1:kzt/D/4a88RoheZmwfqorY3A+tnsSMA9HJC/fQSFKo0= github.com/muesli/termenv v0.9.0 h1:wnbOaGz+LUR3jNT0zOzinPnyDaCZUQRZj9GxK8eRVl8= github.com/muesli/termenv v0.9.0/go.mod h1:R/LzAKf+suGs4IsO95y7+7DpFHO0KABgnZqtlyx2mBw= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pelletier/go-toml v1.9.3 h1:zeC5b1GviRUyKYd6OJPvBU/mcVDVoL1OhT17FCt5dSQ= github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= @@ -425,43 +343,32 @@ github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsK github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= -github.com/pkg/sftp v1.10.1 h1:VasscCm72135zRysgrJDKsntdmPN+OuU3+nnHYA9wyc= github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= 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/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4 h1:gQz4mCbXsO+nc9n1hCxHcGA3Zx3Eo+UHZoInFGUIXNM= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.8.0 h1:FCbCCtXNOY3UtUuHUYaghJg4y7Fd14rXifAYUAtL9R8= github.com/rogpeppe/go-internal v1.8.0/go.mod h1:WmiCO8CzOY8rg0OYDC4/i/2WRWAB6poM+XZ2dLUbcbE= -github.com/rs/xid v1.2.1 h1:mhH9Nq+C1fY2l1XIpgxIiUOfNpRBYH1kKcr+qfKgjRc= -github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/rs/zerolog v1.23.0 h1:UskrK+saS9P9Y789yNNulYKdARjPZuS35B8gJF2x60g= -github.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo= -github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q= +github.com/rs/xid v1.3.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg= +github.com/rs/zerolog v1.24.0 h1:76ivFxmVSRs1u2wUwJVg5VZDYQgeH1JpoS6ndgr9Wy8= +github.com/rs/zerolog v1.24.0/go.mod h1:7KHcEGe0QZPOm2IE4Kpb5rTh6n1h2hIgS5OOnu1rUaI= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shirou/gopsutil/v3 v3.21.5 h1:YUBf0w/KPLk7w1803AYBnH7BmA+1Z/Q5MEZxpREUaB4= github.com/shirou/gopsutil/v3 v3.21.5/go.mod h1:ghfMypLDrFSWN2c9cDYFLHyynQ+QUht0cv/18ZqVczw= github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= -github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q= -github.com/sirupsen/logrus v1.7.0 h1:ShrD1U9pZB12TX0cVy0DtePoCH97K8EtX+mg7ZARUtM= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/assertions v1.2.0 h1:42S6lae5dvLc7BrLu/0ugRtcFVjoJNMC/N3yZFZkDFs= @@ -471,8 +378,8 @@ github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9 github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.0 h1:WhlbjwB9EGCc8W5Rxdkus+wmH2ASRwwTJk6tgHKwdqQ= -github.com/spf13/cast v1.4.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= +github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cobra v1.2.1 h1:+KmjbUw1hriSNMF55oPrkZcb27aECyrj8V2ytv7kWDw= github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= @@ -494,9 +401,7 @@ github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5Cc github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/subosito/gotenv v1.2.0 h1:Slr1R9HxAlEKefgq5jn9U+DnETlIUa6HfgEzj0g5d7s= github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= -github.com/tklauser/go-sysconf v0.3.4 h1:HT8SVixZd3IzLdfs/xlpq0jeSfTX57g1v6wB1EuzV7M= github.com/tklauser/go-sysconf v0.3.4/go.mod h1:Cl2c8ZRWfHD5IrfHo9VN+FX9kCFjIOyVklgXycLB6ek= -github.com/tklauser/numcpus v0.2.1 h1:ct88eFm+Q7m2ZfXJdan1xYoXKlmwsfP+k88q05KvlZc= github.com/tklauser/numcpus v0.2.1/go.mod h1:9aU+wOc6WjUIZEwWMP62PL/41d65P+iks1gBkr4QyP8= github.com/twpayne/go-shell v0.3.0 h1:nhDM9cQTqWwA0jGPOnqzsw8lke2jcKpvxDgnDO8Lq9o= github.com/twpayne/go-shell v0.3.0/go.mod h1:H/gzux0DOH5jsjQSHXs6rs2Onxy+V4j6ycZTOulC0l8= @@ -507,7 +412,6 @@ github.com/twpayne/go-xdg/v6 v6.0.0/go.mod h1:XlfiGBU0iBxudVRWh+SXF+I1Cfb7rMq1IF github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0= github.com/xanzy/ssh-agent v0.3.1 h1:AmzO1SSWxw73zxFZPRwaMN1MohDw8UyHnmuxyceTEGo= github.com/xanzy/ssh-agent v0.3.1/go.mod h1:QIE4lCeL7nkC25x+yA3LBIYfwCc1TFziCtG7cBAac6w= -github.com/xlab/treeprint v1.1.0 h1:G/1DjNkPpfZCFt9CSh6b5/nY4VimlbHF3Rh4obvtzDk= github.com/xlab/treeprint v1.1.0/go.mod h1:gj5Gd3gPdKtR1ikdDK6fnFLdmIS0X30kTTuNd/WEJu0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -523,11 +427,8 @@ github.com/zalando/go-keyring v0.1.1 h1:w2V9lcx/Uj4l+dzAf1m9s+DJ1O8ROkEHnynonHjT github.com/zalando/go-keyring v0.1.1/go.mod h1:OIC+OZ28XbmwFxU/Rp9V7eKzZjamBJwRzC8UFJH9+L8= go.etcd.io/bbolt v1.3.6 h1:/ecaJf0sk1l4l6V4awd65v2C3ILy7MSj+s/x1ADCIMU= go.etcd.io/bbolt v1.3.6/go.mod h1:qXsaaIqmgQH0T+OPdb99Bf+PKfBBQVAdyD6TY9G8XM4= -go.etcd.io/etcd/api/v3 v3.5.0 h1:GsV3S+OfZEOCNXdtNkBSR7kgLobAa/SO6tCxRa0GAYw= go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= -go.etcd.io/etcd/client/pkg/v3 v3.5.0 h1:2aQv6F436YnN7I4VbI8PPYrBhu+SmrTaADcf8Mi/6PU= go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= -go.etcd.io/etcd/client/v2 v2.305.0 h1:ftQ0nOOHMcbMS3KIaDQ0g5Qcd6bhaBrQT6b89DfwLTs= go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= @@ -535,7 +436,6 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= -go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M= go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE= @@ -543,7 +443,6 @@ go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/multierr v1.7.0 h1:zaiO/rmgFjbmCXdSYJWQcdvOCsthmdaHfr3Gm2Kx4Ec= go.uber.org/multierr v1.7.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak= -go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U= go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -556,8 +455,9 @@ golang.org/x/crypto v0.0.0-20200414173820-0848c9571904/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 h1:/UOmuWzQfxxo9UtlXMwuQU8CMgg1eZXqTRwkSQJWKOI= golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5 h1:HWj/xjIHfjYU5nVXpTM0s39J9CbLn7Cc5a7IC5rwsMQ= +golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -567,10 +467,8 @@ golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u0 golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= -golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y= golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= @@ -583,10 +481,8 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= @@ -596,7 +492,6 @@ golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -637,8 +532,8 @@ golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5o golang.org/x/net v0.0.0-20210331212208-0fccb6fa2b5c/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985 h1:4CSI6oo7cOjJKajidEljs9h+uP0rRZBPPPhcCbj5mw8= -golang.org/x/net v0.0.0-20210726213435-c6fcb2dbf985/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a h1:bRuuGXV8wwSdGTB+CtJf+FjgO1APK1CoO39T4BN/XBw= +golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -651,8 +546,8 @@ golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914 h1:3B43BWw0xEBsLZ/NO1VALz6fppU3481pik+2Ksv45z8= -golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f h1:Qmd2pbz05z7z6lm0DrgQVVPuBm92jqujBKMHMOlOQEw= +golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -663,7 +558,6 @@ golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20210220032951-036812b2e83c h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -718,8 +612,10 @@ golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210502180810-71e4cd670f79/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf h1:2ucpDCmfkl8Bd/FsLtiD653Wf96cW37s+iGx93zsu4k= +golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b h1:9zKuko04nR4gjZ4+DNjHqRlAJqbJETHwiNKDqTfOjfE= golang.org/x/term v0.0.0-20210615171337-6886f2dfbf5b/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -730,11 +626,11 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -golang.org/x/time v0.0.0-20191024005414-555d28b269f0 h1:/5xXl8Y5W96D+TtHSlonuFqGHIWVuyCkGJLwGh9JJFs= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -786,8 +682,8 @@ golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4f golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= -golang.org/x/tools v0.1.2 h1:kRBLX7v7Af8W7Gdbbc908OJcdgtK8bOz9Uaj8/F1ACA= golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= +golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -814,7 +710,6 @@ google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34q google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= -google.golang.org/api v0.44.0 h1:URs6qR1lAxDsqWITsQXI4ZkGiYJ5dHtRNiCpfs2OeKA= google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= @@ -864,7 +759,6 @@ google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6D google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= -google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0= google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= @@ -885,7 +779,6 @@ google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA5 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= -google.golang.org/grpc v1.38.0 h1:/9BgsAsa5nWe26HqOlvlgJnqBuktYOLCgjCPqsa56W0= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -930,15 +823,10 @@ honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= howett.net/plist v0.0.0-20201203080718-1454fab16a06 h1:QDxUo/w2COstK1wIBYpzQlHX/NqaQTcf9jyz347nI58= howett.net/plist v0.0.0-20201203080718-1454fab16a06/go.mod h1:vMygbs4qMhSZSc4lCUl2OEE+rDiIIJAIdR4m7MiMcm0= -rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= -rsc.io/goversion v1.2.0 h1:SPn+NLTiAG7w30IRK/DKp1BjvpWabYgxlLp/+kx5J8w= rsc.io/goversion v1.2.0/go.mod h1:Eih9y/uIBS3ulggl7KNJ09xGSLcuNaLgmvvqa07sgfo= -rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= -rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/internal/cmd/cmd.go b/internal/cmd/cmd.go index 3743e5bda1f..49883ce6083 100644 --- a/internal/cmd/cmd.go +++ b/internal/cmd/cmd.go @@ -42,12 +42,13 @@ const ( var ( noArgs = []string(nil) - commandsRx = regexp.MustCompile(`^## Commands`) - commandRx = regexp.MustCompile("^### `(\\S+)`") - exampleRx = regexp.MustCompile("^#### `.+` examples") - optionRx = regexp.MustCompile("^#### `(-\\w|--\\w+)`") - endOfCommandsRx = regexp.MustCompile(`^## `) - trailingSpaceRx = regexp.MustCompile(` +\n`) + commandsRx = regexp.MustCompile(`^## Commands`) + commandRx = regexp.MustCompile("^### `(\\S+)`") + exampleRx = regexp.MustCompile("^#### `.+` examples") + optionRx = regexp.MustCompile("^#### `(-\\w|--\\w+)`") + endOfCommandsRx = regexp.MustCompile("^## ") + horizontalRuleRx = regexp.MustCompile(`^---`) + trailingSpaceRx = regexp.MustCompile(` +\n`) helps map[string]*help ) @@ -143,8 +144,17 @@ func extractHelps(r io.Reader) (map[string]*help, error) { return nil, err } + type stateType int + const ( + stateFindCommands stateType = iota + stateFindFirstCommand + stateInCommand + stateFindExample + stateInExample + ) + var ( - state = "find-commands" + state = stateFindCommands sb = &strings.Builder{} h *help ) @@ -152,12 +162,12 @@ func extractHelps(r io.Reader) (map[string]*help, error) { saveAndReset := func() error { var tr *glamour.TermRenderer switch state { - case "in-command", "find-example": + case stateInCommand, stateFindExample: tr = longTermRenderer - case "in-example": + case stateInExample: tr = examplesTermRenderer default: - panic(fmt.Sprintf("%s: invalid state", state)) + panic(fmt.Sprintf("%d: invalid state", state)) } s, err := tr.Render(sb.String()) if err != nil { @@ -166,12 +176,12 @@ func extractHelps(r io.Reader) (map[string]*help, error) { s = trailingSpaceRx.ReplaceAllString(s, "\n") s = strings.Trim(s, "\n") switch state { - case "in-command", "find-example": + case stateInCommand, stateFindExample: h.long = "Description:\n" + s - case "in-example": + case stateInExample: h.example = s default: - panic(fmt.Sprintf("%s: invalid state", state)) + panic(fmt.Sprintf("%d: invalid state", state)) } sb.Reset() return nil @@ -182,17 +192,17 @@ func extractHelps(r io.Reader) (map[string]*help, error) { FOR: for s.Scan() { switch state { - case "find-commands": + case stateFindCommands: if commandsRx.MatchString(s.Text()) { - state = "find-first-command" + state = stateFindFirstCommand } - case "find-first-command": + case stateFindFirstCommand: if m := commandRx.FindStringSubmatch(s.Text()); m != nil { h = &help{} helps[m[1]] = h - state = "in-command" + state = stateInCommand } - case "in-command", "find-example", "in-example": + case stateInCommand, stateFindExample, stateInExample: m := commandRx.FindStringSubmatch(s.Text()) switch { case m != nil: @@ -201,20 +211,25 @@ FOR: } h = &help{} helps[m[1]] = h - state = "in-command" + state = stateInCommand case optionRx.MatchString(s.Text()): - state = "find-example" + state = stateFindExample case exampleRx.MatchString(s.Text()): if err := saveAndReset(); err != nil { return nil, err } - state = "in-example" + state = stateInExample case endOfCommandsRx.MatchString(s.Text()): if err := saveAndReset(); err != nil { return nil, err } break FOR - case state != "find-example": + case horizontalRuleRx.MatchString(s.Text()): + if err := saveAndReset(); err != nil { + return nil, err + } + state = stateFindFirstCommand + case state != stateFindExample: if _, err := sb.WriteString(s.Text()); err != nil { return nil, err } diff --git a/internal/cmd/githubtemplatefuncs.go b/internal/cmd/githubtemplatefuncs.go index cdfdca0ad68..226858e0b6c 100644 --- a/internal/cmd/githubtemplatefuncs.go +++ b/internal/cmd/githubtemplatefuncs.go @@ -3,7 +3,7 @@ package cmd import ( "context" - "github.com/google/go-github/v36/github" + "github.com/google/go-github/v38/github" ) type gitHubData struct { diff --git a/internal/cmd/main_test.go b/internal/cmd/main_test.go index d36a6a699ab..2905c7e1330 100644 --- a/internal/cmd/main_test.go +++ b/internal/cmd/main_test.go @@ -71,6 +71,8 @@ func TestScript(t *testing.T) { return runtime.GOOS == "freebsd", nil case "linux": return runtime.GOOS == "linux", nil + case "openbsd": + return runtime.GOOS == "openbsd", nil case "windows": return runtime.GOOS == "windows", nil } diff --git a/internal/cmd/testdata/scripts/archivetar.txt b/internal/cmd/testdata/scripts/archivetar.txt index ab3e6a4f4bc..ff888a6965b 100644 --- a/internal/cmd/testdata/scripts/archivetar.txt +++ b/internal/cmd/testdata/scripts/archivetar.txt @@ -1,5 +1,6 @@ mksourcedir +[openbsd] exec sed -e 's:/$::g' -i golden/archive-tar [windows] unix2dos golden/archive-tar chezmoi archive --output=archive.tar diff --git a/internal/cmd/testdata/scripts/runscriptdir_unix.txt b/internal/cmd/testdata/scripts/runscriptdir_unix.txt index 39b5b2284b5..749df055116 100644 --- a/internal/cmd/testdata/scripts/runscriptdir_unix.txt +++ b/internal/cmd/testdata/scripts/runscriptdir_unix.txt @@ -1,6 +1,8 @@ [windows] skip 'UNIX only' [!umask:022] skip +[openbsd] exec sed -e 's:/$::g' -i golden/archive + chezmoi apply cmpenv stdout golden/apply diff --git a/internal/cmd/testdata/scripts/scriptsubdir_unix.txt b/internal/cmd/testdata/scripts/scriptsubdir_unix.txt index 71c4e5c3742..59b6c4af83d 100644 --- a/internal/cmd/testdata/scripts/scriptsubdir_unix.txt +++ b/internal/cmd/testdata/scripts/scriptsubdir_unix.txt @@ -1,6 +1,8 @@ [windows] skip 'UNIX only' [!umask:022] skip +[openbsd] exec sed -e 's:/$::g' -i golden/archive + # test that scripts in subdirectories are run in the subdirectory chezmoi apply --force cmpenv stdout golden/apply diff --git a/internal/cmd/upgradecmd.go b/internal/cmd/upgradecmd.go index 36af9f9e30c..37e80aeb9d1 100644 --- a/internal/cmd/upgradecmd.go +++ b/internal/cmd/upgradecmd.go @@ -23,7 +23,7 @@ import ( "syscall" "github.com/coreos/go-semver/semver" - "github.com/google/go-github/v36/github" + "github.com/google/go-github/v38/github" "github.com/rs/zerolog/log" "github.com/spf13/cobra" vfs "github.com/twpayne/go-vfs/v3" diff --git a/internal/cmd/util.go b/internal/cmd/util.go index 107493a3a22..ddcf5b82f43 100644 --- a/internal/cmd/util.go +++ b/internal/cmd/util.go @@ -10,7 +10,7 @@ import ( "strings" "unicode" - "github.com/google/go-github/v36/github" + "github.com/google/go-github/v38/github" "golang.org/x/oauth2" )