pax_global_header00006660000000000000000000000064145123651240014515gustar00rootroot0000000000000052 comment=58f9a7fa03eb165c1f02a45805a07ebe0a08923d jqp-0.5.0/000077500000000000000000000000001451236512400123115ustar00rootroot00000000000000jqp-0.5.0/.github/000077500000000000000000000000001451236512400136515ustar00rootroot00000000000000jqp-0.5.0/.github/workflows/000077500000000000000000000000001451236512400157065ustar00rootroot00000000000000jqp-0.5.0/.github/workflows/release.yml000066400000000000000000000014751451236512400200600ustar00rootroot00000000000000name: goreleaser on: push: # run only against tags tags: - '*' permissions: contents: write # packages: write # issues: write jobs: goreleaser: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 with: fetch-depth: 0 - name: Fetch all tags run: git fetch --force --tags - name: Set up Go uses: actions/setup-go@v4 with: go-version: 1.21 - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5 with: distribution: goreleaser version: latest args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }} jqp-0.5.0/.gitignore000066400000000000000000000000121451236512400142720ustar00rootroot00000000000000jqp dist/ jqp-0.5.0/.goreleaser.yaml000066400000000000000000000017731451236512400154130ustar00rootroot00000000000000project_name: "jqp" before: hooks: # You may remove this if you don't use go modules. - go mod tidy builds: - env: - CGO_ENABLED=0 goos: - linux - windows - darwin archives: - id: default name_template: >- {{ .ProjectName }}_ {{- title .Os }}_ {{- if eq .Arch "amd64" }}x86_64 {{- else if eq .Arch "386" }}i386 {{- else }}{{ .Arch }}{{ end }} checksum: name_template: 'checksums.txt' snapshot: name_template: "{{ incpatch .Version }}-next" changelog: sort: asc filters: exclude: - '^docs:' - '^test:' brews: - homepage: https://github.com/noahgorstein/jqp description: "a TUI playground to experiment and play with jq" folder: Formula repository: owner: noahgorstein name: homebrew-tap branch: main token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}" commit_author: name: goreleaserbot email: bot@goreleaser.com license: "MIT" install: | bin.install "jqp" jqp-0.5.0/CONTRIBUTING.md000066400000000000000000000004421451236512400145420ustar00rootroot00000000000000# Contributing Pull requests are welcome for any changes. Consider opening an issue for larger changes to get feedback on the idea. For commit messages, please use conventional commits[^1] to make it easier to generate release notes. [^1]: https://www.conventionalcommits.org/en/v1.0.0 jqp-0.5.0/LICENSE000066400000000000000000000020701451236512400133150ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) 2022 Noah Gorstein Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. jqp-0.5.0/README.md000066400000000000000000000141541451236512400135750ustar00rootroot00000000000000# jqp a TUI playground for exploring jq. ![jqp](https://user-images.githubusercontent.com/23270779/191256434-05aeda9d-9ee2-4b5e-a23f-6548dac08fdb.gif) This application utilizes [itchyny's](https://github.com/itchyny) implementation of `jq` written in Go, [`gojq`](https://github.com/itchyny/gojq). ## Installation ### homebrew ```bash brew install noahgorstein/tap/jqp ``` ### macports ```bash sudo port install jqp ``` ### Arch Linux Available through the Arch User Repository as [jqp-bin](https://aur.archlinux.org/packages/jqp-bin). ```bash yay -S jqp-bin ``` ### Github releases Download the relevant asset for your operating system from the latest Github release. Unpack it, then move the binary to somewhere accessible in your `PATH`, e.g. `mv ./jqp /usr/local/bin`. ### Build from source Clone this repo, build from source with `cd jqp && go build`, then move the binary to somewhere accessible in your `PATH`, e.g. `mv ./jqp /usr/local/bin`. ## Usage ``` ➜ jqp --help jqp is a TUI to explore the jq command line utility Usage: jqp [flags] Flags: --config string config file (default is $HOME/.jqp.yaml) -f, --file string path to the input JSON file -h, --help help for jqp -t, --theme string jqp theme -v, --version version for jqp ``` `jqp` also supports input from STDIN. STDIN takes precedence over the command line flag. ``` ➜ curl "https://api.github.com/repos/stedolan/jq/issues?per_page=2" | jqp ``` ## Keybindings | **Keybinding** | **Action** | |:---------------|:-----------| | `tab` | cycle through sections | | `shift-tab` | cycle through sections in reverse | | `ctrl-y` | copy query to system clipboard[^1] | | `ctrl-s` | save output to file | | `ctrl-c` | quit program / kill long running query | ### Query Mode | **Keybinding** | **Action** | |:---------------|:-----------| | `enter` | execute query | | `↑`/`↓` | cycle through query history | | `ctrl-a` | go to beginning of line | | `ctrl-e` | go to end of line | | `←`/`ctrl-b` | move cursor one character to left | | `→`/`ctrl-f`| move cursor one character to right | | `ctrl-k` | delete text after cursor line | | `ctrl-u` | delete text before cursor | | `ctrl-w` | delete word to left | | `ctrl-d` | delete character under cursor | ### Input Preview and Output Mode | **Keybinding** | **Action** | |:---------------|:-----------| | `↑/k` | up | | `↓/j` | down | | `ctrl-u` | page up | | `ctrl-d` | page down | ## Configuration `jqp` can be configured with a configuration file. By default, `jqp` will search your home directory for a YAML file named `.jqp.yaml`. A path to a YAML configuration file can also be provided to the `--config` command line flag. ```bash ➜ jqp --config ~/my_jqp_config.yaml < data.json ``` If a configuration option is present in both the configuration file and the command line, the command line option takes precedence. For example, if a theme is specified in the configuration file and via `-t/--theme flag`, the command line flag will take precedence. ### Available Configuration Options ```yaml theme: name: "nord" # controls the color scheme chromaStyleOverrides: # override parts of the chroma style kc: "#009900 underline" # keys use the chroma short names ``` ## Themes Themes can be specified on the command line via the `-t/--theme ` flag. You can also set a theme in your [configuration file](#configuration). ```yaml theme: name: "monokai" ``` Screen Shot 2022-10-02 at 5 31 40 PM ### Chroma Style Overrides Overrides to the chroma styles used for a theme can be configured in your [configuration file](#configuration). For the list of short keys, see [`chroma.StandardTypes`](https://github.com/alecthomas/chroma/blob/d38b87110b078027006bc34aa27a065fa22295a1/types.go#L210-L308). To see which token to use for a value, see the [JSON lexer](https://github.com/alecthomas/chroma/blob/master/lexers/embedded/json.xml) (look for `` tags). To see the color and what's used in the style you're using, look for your style in the chroma [styles directory](https://github.com/alecthomas/chroma/tree/master/styles). ```yaml theme: name: "monokai" # name is required to know which theme to override chromaStyleOverrides: kc: "#009900 underline" ``` You can change non-syntax colors using the `styleOverrides` key: ```yaml theme: styleOverrides: primary: "#c4b28a" secondary: "#8992a7" error: "#c4746e" inactive: "#a6a69c" success: "#87a987" ``` Themes are broken up into [light](#light-themes) and [dark](#dark-themes) themes. Light themes work best in terminals with a light background and dark themes work best in a terminal with a dark background. If no theme is specified or a non-existant theme is provided, the default theme is used, which was created to work with both terminals with a light and dark background. ### Light Themes - `abap` - `algol` - `arduino` - `autumn` - `borland` - `colorful` - `emacs` - `friendly` - `github` - `gruvbox-light` - `hrdark` - `igor` - `lovelace` - `manni` - `monokai-light` - `murphy` - `onesenterprise` - `paradaiso-light` - `pastie` - `perldoc` - `pygments` - `solarized-light` - `tango` - `trac` - `visual_studio` - `vulcan` - `xcode` ### Dark Themes - `average` - `base16snazzy` - `doom-one` - `doom-one2` - `dracula` - `fruity` - `github-dark` - `gruvbox` - `monokai` - `native` - `paradaiso-dark` - `rrt` - `solarized-dark` - `solarized-dark256` - `swapoff` - `vim` - `witchhazel` - `xcode-dark` ## Built with: - [Bubbletea](https://github.com/charmbracelet/bubbletea) - [Bubbles](https://github.com/charmbracelet/bubbles) - [Lipgloss](https://github.com/charmbracelet/lipgloss) - [gojq](https://github.com/itchyny/gojq) - [chroma](https://github.com/alecthomas/chroma) ## Credits - [jqq](https://github.com/jcsalterego/jqq) for inspiration -------- [^1]: `jqp` uses [https://github.com/atotto/clipboard](https://github.com/atotto/clipboard) for clipboard functionality. Things should work as expected with OSX and Windows. Linux, Unix require `xclip` or `xsel` to be installed. jqp-0.5.0/cmd/000077500000000000000000000000001451236512400130545ustar00rootroot00000000000000jqp-0.5.0/cmd/root.go000066400000000000000000000076171451236512400144010ustar00rootroot00000000000000package cmd import ( "errors" "fmt" "os" "github.com/alecthomas/chroma/v2" "github.com/charmbracelet/bubbletea" "github.com/noahgorstein/jqp/tui/bubbles/jqplayground" "github.com/noahgorstein/jqp/tui/theme" "github.com/spf13/cobra" "github.com/spf13/viper" ) var rootCmd = &cobra.Command{ Version: "0.5.0", Use: "jqp", Short: "jqp is a TUI to explore jq", Long: `jqp is a TUI to explore the jq command line utility`, SilenceUsage: true, RunE: func(cmd *cobra.Command, args []string) error { configTheme := viper.GetString(configKeysName.themeName) if !cmd.Flags().Changed(flagsName.theme) { flags.theme = configTheme } themeOverrides := viper.GetStringMapString(configKeysName.themeOverrides) styleOverrides := viper.GetStringMapString(configKeysName.styleOverrides) jqtheme, defaultTheme := theme.GetTheme(flags.theme, styleOverrides) // If not using the default theme, // and if theme specified is the same as in the config, // which happens if the theme flag was used, // apply chroma style overrides. if !defaultTheme && configTheme == flags.theme && len(themeOverrides) > 0 { // Reverse chroma.StandardTypes to be keyed by short string chromaTypes := make(map[string]chroma.TokenType) for tokenType, short := range chroma.StandardTypes { chromaTypes[short] = tokenType } builder := jqtheme.ChromaStyle.Builder() for k, v := range themeOverrides { builder.Add(chromaTypes[k], v) } style, err := builder.Build() if err == nil { jqtheme.ChromaStyle = style } } if isInputFromPipe() { stdin := streamToBytes(os.Stdin) isValidJson := isValidJson(stdin) if !isValidJson { return errors.New("JSON is not valid") } bubble := jqplayground.New(stdin, "STDIN", jqtheme) p := tea.NewProgram(bubble, tea.WithAltScreen()) if err := p.Start(); err != nil { return err } return nil } else { // get the file file, e := getFile() if e != nil { return e } defer file.Close() // read the file data, err := os.ReadFile(flags.filepath) if err != nil { return err } isValidJson := isValidJson(data) if !isValidJson { return errors.New("JSON is not valid") } // get file info so we can get the filename fi, err := os.Stat(flags.filepath) if err != nil { return err } bubble := jqplayground.New(data, fi.Name(), jqtheme) p := tea.NewProgram(bubble, tea.WithAltScreen()) if err := p.Start(); err != nil { return err } return nil } }, } func initConfig() { if cfgFile != "" { // Use config file from the flag. viper.SetConfigFile(cfgFile) } else { // Find home directory. home, err := os.UserHomeDir() cobra.CheckErr(err) // Search config in home directory viper.AddConfigPath(home) // register the config file viper.SetConfigName(".jqp") //only read from yaml files viper.SetConfigType("yaml") } if err := viper.ReadInConfig(); err == nil { fmt.Println("Config file:", viper.ConfigFileUsed(), "was used.") } } var flags struct { filepath, theme string } var flagsName = struct { file, fileShort, theme, themeShort string }{ file: "file", fileShort: "f", theme: "theme", themeShort: "t", } var configKeysName = struct { themeName string themeOverrides string styleOverrides string }{ themeName: "theme.name", themeOverrides: "theme.chromaStyleOverrides", styleOverrides: "theme.styleOverrides", } var cfgFile string func Execute() { cobra.OnInitialize(initConfig) rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "path to config file (default is $HOME/.jqp.yaml)") rootCmd.Flags().StringVarP( &flags.filepath, flagsName.file, flagsName.fileShort, "", "path to the input JSON file") rootCmd.Flags().StringVarP( &flags.theme, flagsName.theme, flagsName.themeShort, "", "jqp theme") if err := rootCmd.Execute(); err != nil { os.Exit(1) } } jqp-0.5.0/cmd/utils.go000066400000000000000000000016141451236512400145450ustar00rootroot00000000000000package cmd import ( "bytes" "encoding/json" "errors" "fmt" "io" "os" ) func streamToBytes(stream io.Reader) []byte { buf := new(bytes.Buffer) buf.ReadFrom(stream) return buf.Bytes() } func isInputFromPipe() bool { fi, _ := os.Stdin.Stat() return (fi.Mode() & os.ModeCharDevice) == 0 } func getFile() (*os.File, error) { if flags.filepath == "" { return nil, errors.New("Please provide an input file.") } if !fileExists(flags.filepath) { return nil, errors.New("The file provided does not exist.") } file, e := os.Open(flags.filepath) if e != nil { return nil, errors.New(fmt.Sprintf("Unable to open file: %s", e)) } return file, nil } func fileExists(filepath string) bool { info, e := os.Stat(filepath) if os.IsNotExist(e) { return false } return !info.IsDir() } func isValidJson(input []byte) bool { var js json.RawMessage return json.Unmarshal(input, &js) == nil } jqp-0.5.0/go.mod000066400000000000000000000035631451236512400134260ustar00rootroot00000000000000module github.com/noahgorstein/jqp go 1.21 require ( github.com/alecthomas/chroma/v2 v2.3.0 github.com/atotto/clipboard v0.1.4 github.com/charmbracelet/bubbles v0.16.1 github.com/charmbracelet/bubbletea v0.24.1 github.com/charmbracelet/lipgloss v0.8.0 github.com/itchyny/gojq v0.12.13 github.com/muesli/termenv v0.15.2 github.com/spf13/cobra v1.5.0 github.com/spf13/viper v1.13.0 ) require ( github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 // indirect github.com/dlclark/regexp2 v1.4.0 // indirect github.com/fsnotify/fsnotify v1.5.4 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/itchyny/timefmt-go v0.1.5 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/magiconair/properties v1.8.6 // indirect github.com/mattn/go-isatty v0.0.19 // indirect github.com/mattn/go-localereader v0.0.1 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b // indirect github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/reflow v0.3.0 // indirect github.com/pelletier/go-toml v1.9.5 // indirect github.com/pelletier/go-toml/v2 v2.0.5 // indirect github.com/rivo/uniseg v0.4.4 // indirect github.com/spf13/afero v1.8.2 // indirect github.com/spf13/cast v1.5.0 // indirect github.com/spf13/jwalterweatherman v1.1.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/subosito/gotenv v1.4.1 // indirect golang.org/x/sync v0.1.0 // indirect golang.org/x/sys v0.8.0 // indirect golang.org/x/term v0.6.0 // indirect golang.org/x/text v0.3.8 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) jqp-0.5.0/go.sum000066400000000000000000001476401451236512400134600ustar00rootroot00000000000000cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= 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/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/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= 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/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/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/alecthomas/chroma/v2 v2.3.0 h1:83xfxrnjv8eK+Cf8qZDzNo3PPF9IbTWHs7z28GY6D0U= github.com/alecthomas/chroma/v2 v2.3.0/go.mod h1:mZxeWZlxP2Dy+/8cBob2PYd8O2DwNAzave5AY7A2eQw= github.com/alecthomas/repr v0.1.0 h1:ENn2e1+J3k09gyj2shc0dHr/yjaWSHRlrJ4DPMevDqE= github.com/alecthomas/repr v0.1.0/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/charmbracelet/bubbles v0.16.1 h1:6uzpAAaT9ZqKssntbvZMlksWHruQLNxg49H5WdeuYSY= github.com/charmbracelet/bubbles v0.16.1/go.mod h1:2QCp9LFlEsBQMvIYERr7Ww2H2bA7xen1idUDIzm/+Xc= github.com/charmbracelet/bubbletea v0.24.1 h1:LpdYfnu+Qc6XtvMz6d/6rRY71yttHTP5HtrjMgWvixc= github.com/charmbracelet/bubbletea v0.24.1/go.mod h1:rK3g/2+T8vOSEkNHvtq40umJpeVYDn6bLaqbgzhL/hg= github.com/charmbracelet/lipgloss v0.8.0 h1:IS00fk4XAHcf8uZKc3eHeMUTCxUH6NkaTrdyCQk84RU= github.com/charmbracelet/lipgloss v0.8.0/go.mod h1:p4eYUZZJ/0oXTuCQKFF8mqyKCz0ja6y+7DniDDw5KKU= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 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/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81 h1:q2hJAaP1k2wIvVRd/hEHD7lacgqrCPS+k8g1MndzfWY= github.com/containerd/console v1.0.4-0.20230313162750-1ae8d489ac81/go.mod h1:YynlIjWYF8myEu6sdkwKIvGQq+cOckRm6So2avqoYAk= github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dlclark/regexp2 v1.4.0 h1:F1rxgk7p4uKjwIQxBs9oAXe5CqrXlCduYEJvrF4u93E= github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 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/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= 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/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 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/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= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 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/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 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= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= 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/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= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 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-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.1.2/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/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 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/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= github.com/itchyny/gojq v0.12.13 h1:IxyYlHYIlspQHHTE0f3cJF0NKDMfajxViuhBLnHd/QU= github.com/itchyny/gojq v0.12.13/go.mod h1:JzwzAqenfhrPUuwbmEz3nu3JQmFLlQTQMUcOdnu/Sf4= github.com/itchyny/timefmt-go v0.1.5 h1:G0INE2la8S6ru/ZI5JecgyzbbJNs5lG1RcBqa7Jm6GE= github.com/itchyny/timefmt-go v0.1.5/go.mod h1:nEP7L+2YmAbT2kZ2HfSs1d8Xtw9LY8D2stDBckWakZ8= 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/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 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.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= 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= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/magiconair/properties v1.8.6 h1:5ibWZ6iY0NctNGWo87LalDlEZ6R41TqbbDamhfG/Qzo= github.com/magiconair/properties v1.8.6/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/mattn/go-localereader v0.0.1 h1:ygSAOl7ZXTx4RdPYinUpg6W99U8jWvWi9Ye2JC/oIi4= github.com/mattn/go-localereader v0.0.1/go.mod h1:8fBrzywKY7BI3czFoHkuzRoWE9C+EiG4R1k4Cjx5p88= github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b h1:1XF24mVaiu7u+CFywTdcDo2ie1pzzhwjt6RHqzpMU34= github.com/muesli/ansi v0.0.0-20211018074035-2e021307bc4b/go.mod h1:fQuZ0gauxyBcmsdE3ZT4NasjaRdxmbCS0jRHsrWu3Ho= github.com/muesli/cancelreader v0.2.2 h1:3I4Kt4BQjOR54NavqnDogx/MIoWBFa0StPA8ELUXHmA= github.com/muesli/cancelreader v0.2.2/go.mod h1:3XuTXfFS2VjM+HTLZY9Ak0l6eUKfijIfMUZ4EgX0QYo= github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.15.2 h1:GohcuySI0QmI3wN8Ok9PtKGkgkFIk7y6Vpb5PvrY+Wo= github.com/muesli/termenv v0.15.2/go.mod h1:Epx+iuz8sNs7mNKhxzH4fWXGNpZwUaJKRS1noLXviQ8= github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= github.com/pelletier/go-toml/v2 v2.0.5 h1:ipoSadvV8oGUjnUbMub59IDPPwfxF694nG/jwbMiyQg= github.com/pelletier/go-toml/v2 v2.0.5/go.mod h1:OMHamSCAODeSsVrwwvcJOaoN0LIUIaFVNZzmWyNfXas= github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= 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/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/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/spf13/afero v1.8.2 h1:xehSyVa0YnHWsJ49JFljMpg1HX19V6NDZ1fkm1Xznbo= github.com/spf13/afero v1.8.2/go.mod h1:CtAatgMJh6bJEIs48Ay/FOnkljP3WeGUG0MC1RfAqwo= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU= github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM= github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk= github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/spf13/viper v1.13.0 h1:BWSJ/M+f+3nmdz9bxB+bWX28kkALN2ok11D0rSo8EJU= github.com/spf13/viper v1.13.0/go.mod h1:Icm2xNL3/8uyh/wFuB1jI7TiTNKp8632Nwegu+zgdYw= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/subosito/gotenv v1.4.1 h1:jyEFiXpy21Wm81FBN71l9VoMMV8H8jG+qIK3GCpY6Qs= github.com/subosito/gotenv v1.4.1/go.mod h1:ayKnFf/c6rvx/2iiLrJUk1e6plDbT3edrFNGqEflhK0= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= 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= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/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= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 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/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/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= golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= 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/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= 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= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 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/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= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 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= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/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= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 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.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o= golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU= golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.6.0 h1:clScbb1cHjoCkyRbWwBEUZ5H/tIFu5TAXIqaZD0Gcjw= golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 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.8 h1:nAL+RVCQ9uMn3vJZbV+MRnydTJFPf8qqY42YiA6MrqY= golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= 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/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= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 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= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= 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= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 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= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY= gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 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/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= jqp-0.5.0/main.go000066400000000000000000000001341451236512400135620ustar00rootroot00000000000000package main import ( "github.com/noahgorstein/jqp/cmd" ) func main() { cmd.Execute() } jqp-0.5.0/tui/000077500000000000000000000000001451236512400131125ustar00rootroot00000000000000jqp-0.5.0/tui/bubbles/000077500000000000000000000000001451236512400145305ustar00rootroot00000000000000jqp-0.5.0/tui/bubbles/fileselector/000077500000000000000000000000001451236512400172105ustar00rootroot00000000000000jqp-0.5.0/tui/bubbles/fileselector/fileselector.go000066400000000000000000000023451451236512400222230ustar00rootroot00000000000000package fileselector import ( "github.com/charmbracelet/bubbles/textinput" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" "github.com/noahgorstein/jqp/tui/theme" ) type Bubble struct { Styles Styles textinput textinput.Model } func New(theme theme.Theme) Bubble { s := DefaultStyles() ti := textinput.New() ti.Focus() ti.PromptStyle = s.promptStyle.Foreground(theme.Secondary) s.inputLabelStyle.Foreground(theme.Primary) return Bubble{ Styles: s, textinput: ti, } } func (b Bubble) GetInput() string { return b.textinput.Value() } func (b *Bubble) SetInput(input string) { b.textinput.SetValue(input) } func (b Bubble) Init() tea.Cmd { return nil } func (b Bubble) View() string { return b.Styles.containerStyle.Render( lipgloss.JoinVertical( lipgloss.Left, b.Styles.inputLabelStyle.Render("Save output to file: "), b.textinput.View())) } func (b Bubble) Update(msg tea.Msg) (Bubble, tea.Cmd) { var ( cmd tea.Cmd cmds []tea.Cmd ) b.textinput, cmd = b.textinput.Update(msg) cmds = append(cmds, cmd) return b, tea.Batch(cmds...) } func (b Bubble) SetSize(width int) { b.Styles.containerStyle. Width(width - b.Styles.containerStyle.GetHorizontalFrameSize()) } jqp-0.5.0/tui/bubbles/fileselector/styles.go000066400000000000000000000006361451236512400210670ustar00rootroot00000000000000package fileselector import ( "github.com/charmbracelet/lipgloss" ) type Styles struct { containerStyle lipgloss.Style inputLabelStyle lipgloss.Style promptStyle lipgloss.Style } func DefaultStyles() (s Styles) { s.containerStyle = lipgloss.NewStyle().Align(lipgloss.Left).PaddingLeft(1) s.inputLabelStyle = lipgloss.NewStyle().Bold(true) s.promptStyle = lipgloss.NewStyle().Bold(true) return s } jqp-0.5.0/tui/bubbles/help/000077500000000000000000000000001451236512400154605ustar00rootroot00000000000000jqp-0.5.0/tui/bubbles/help/help.go000066400000000000000000000032601451236512400167400ustar00rootroot00000000000000package help import ( "github.com/charmbracelet/bubbles/help" "github.com/charmbracelet/bubbles/key" "github.com/charmbracelet/bubbletea" "github.com/noahgorstein/jqp/tui/bubbles/state" "github.com/noahgorstein/jqp/tui/theme" ) type Bubble struct { state state.State width int help help.Model keys keyMap Styles Styles } func New(theme theme.Theme) Bubble { styles := DefaultStyles() help := help.NewModel() help.Styles.ShortKey = styles.helpKeyStyle.Foreground(theme.Primary) help.Styles.ShortDesc = styles.helpTextStyle.Foreground(theme.Secondary) help.Styles.ShortSeparator = styles.helpSeparatorStyle.Foreground(theme.Inactive) return Bubble{ state: state.Query, Styles: styles, help: help, keys: keys, } } func (b Bubble) collectHelpBindings() []key.Binding { k := b.keys bindings := []key.Binding{} switch b.state { case state.Query: bindings = append(bindings, k.submit, k.section, k.copyQuery, k.save) case state.Running: bindings = append(bindings, k.abort) case state.Input, state.Output: bindings = append(bindings, k.section, k.navigate, k.page, k.copyQuery, k.save) case state.Save: bindings = append(bindings, k.back) } return bindings } func (b *Bubble) SetWidth(width int) { b.Styles.helpbarStyle.Width(width - 1) } func (b Bubble) Init() tea.Cmd { return nil } func (b Bubble) View() string { return b.Styles.helpbarStyle.Render(b.help.ShortHelpView(b.collectHelpBindings())) } func (b *Bubble) SetState(mode state.State) { b.state = mode } func (b Bubble) Update(msg tea.Msg) (Bubble, tea.Cmd) { var cmd tea.Cmd switch msg := msg.(type) { case tea.WindowSizeMsg: b.SetWidth(msg.Width) } return b, tea.Batch(cmd) } jqp-0.5.0/tui/bubbles/help/keys.go000066400000000000000000000020021451236512400167540ustar00rootroot00000000000000package help import "github.com/charmbracelet/bubbles/key" type keyMap struct { section key.Binding back key.Binding submit key.Binding abort key.Binding navigate key.Binding page key.Binding save key.Binding copyQuery key.Binding } var keys = keyMap{ section: key.NewBinding( key.WithKeys("tab"), key.WithHelp("tab", "section")), back: key.NewBinding( key.WithKeys("esc"), key.WithHelp("esc", "back")), submit: key.NewBinding( key.WithKeys("enter"), key.WithHelp("enter", "submit query")), abort: key.NewBinding( key.WithKeys("ctrl+c"), key.WithHelp("ctrl+c", "abort running query")), navigate: key.NewBinding( key.WithKeys("↑↓"), key.WithHelp("↑↓", "scroll")), page: key.NewBinding( key.WithKeys("ctrl+u/ctrl+d"), key.WithHelp("ctrl+u/ctrl+d", "page up/down")), save: key.NewBinding( key.WithKeys("ctrl+s"), key.WithHelp("ctrl+s", "save output")), copyQuery: key.NewBinding( key.WithKeys("ctrl+y"), key.WithHelp("ctrl+y", "copy query")), } jqp-0.5.0/tui/bubbles/help/styles.go000066400000000000000000000007511451236512400173350ustar00rootroot00000000000000package help import ( "github.com/charmbracelet/lipgloss" ) type Styles struct { helpbarStyle lipgloss.Style helpKeyStyle lipgloss.Style helpTextStyle lipgloss.Style helpSeparatorStyle lipgloss.Style } func DefaultStyles() (s Styles) { s.helpbarStyle = lipgloss.NewStyle().MarginLeft(1).MarginBottom(1) s.helpKeyStyle = lipgloss.NewStyle().Bold(true) s.helpSeparatorStyle = lipgloss.NewStyle().Bold(true) s.helpTextStyle = lipgloss.NewStyle() return s } jqp-0.5.0/tui/bubbles/inputdata/000077500000000000000000000000001451236512400165215ustar00rootroot00000000000000jqp-0.5.0/tui/bubbles/inputdata/inputdata.go000066400000000000000000000056201451236512400210440ustar00rootroot00000000000000package inputdata import ( "bytes" "encoding/json" "fmt" "strings" "github.com/alecthomas/chroma/v2" "github.com/charmbracelet/bubbles/viewport" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" "github.com/noahgorstein/jqp/tui/theme" "github.com/noahgorstein/jqp/tui/utils" ) type Bubble struct { Styles Styles viewport viewport.Model height int width int inputJson []byte highlightedJson *bytes.Buffer filename string } func New(inputJson []byte, filename string, theme theme.Theme) Bubble { styles := DefaultStyles() styles.containerStyle = styles.containerStyle.BorderForeground(theme.Inactive) styles.infoStyle = styles.infoStyle.BorderForeground(theme.Inactive) v := viewport.New(0, 0) b := Bubble{ Styles: styles, viewport: v, inputJson: inputJson, highlightedJson: highlightInputJson(inputJson, theme.ChromaStyle), filename: filename, } return b } func (b *Bubble) SetBorderColor(color lipgloss.TerminalColor) { b.Styles.containerStyle.BorderForeground(color) b.Styles.infoStyle.BorderForeground(color) } func highlightInputJson(inputJson []byte, chromaStyle *chroma.Style) *bytes.Buffer { var f interface{} // TODO: error handling json.Unmarshal(inputJson, &f) var prettyJSON bytes.Buffer // TODO: error handling json.Indent(&prettyJSON, []byte(inputJson), "", " ") buf := new(bytes.Buffer) utils.HighlightJson(buf, prettyJSON.String(), chromaStyle) return buf } func (b Bubble) GetInputJson() []byte { return b.inputJson } func (b *Bubble) SetSize(width, height int) { b.width = width b.height = height b.Styles.containerStyle. Width(width - b.Styles.containerStyle.GetHorizontalFrameSize()/2). Height(height - b.Styles.containerStyle.GetVerticalFrameSize()) b.viewport.Width = width - b.Styles.containerStyle.GetHorizontalFrameSize() - 3 b.viewport.Height = height - b.Styles.containerStyle.GetVerticalFrameSize() - 3 renderedJson := lipgloss.NewStyle().Width(b.viewport.Width - 3).Render(b.highlightedJson.String()) b.viewport.SetContent(renderedJson) } func max(a, b int) int { if a > b { return a } return b } func (b Bubble) View() string { scrollPercent := fmt.Sprintf("%3.f%%", b.viewport.ScrollPercent()*100) info := b.Styles.infoStyle.Render(fmt.Sprintf("%s | %s", lipgloss.NewStyle().Italic(true).Render(b.filename), scrollPercent)) line := strings.Repeat(" ", max(0, b.viewport.Width-lipgloss.Width(info))) footer := lipgloss.JoinHorizontal(lipgloss.Center, line, info) content := lipgloss.JoinVertical(lipgloss.Left, b.viewport.View(), footer) return b.Styles.containerStyle.Render(content) } func (b Bubble) Init() tea.Cmd { return nil } func (b Bubble) Update(msg tea.Msg) (Bubble, tea.Cmd) { var ( cmd tea.Cmd cmds []tea.Cmd ) b.viewport, cmd = b.viewport.Update(msg) cmds = append(cmds, cmd) return b, tea.Batch(cmds...) } jqp-0.5.0/tui/bubbles/inputdata/styles.go000066400000000000000000000005731451236512400204000ustar00rootroot00000000000000package inputdata import ( "github.com/charmbracelet/lipgloss" ) type Styles struct { infoStyle lipgloss.Style containerStyle lipgloss.Style } func DefaultStyles() (s Styles) { s.infoStyle = lipgloss.NewStyle().Bold(true).Border(lipgloss.RoundedBorder()).Padding(0, 1) s.containerStyle = lipgloss.NewStyle().Border(lipgloss.RoundedBorder()).Padding(1) return s } jqp-0.5.0/tui/bubbles/jqplayground/000077500000000000000000000000001451236512400172475ustar00rootroot00000000000000jqp-0.5.0/tui/bubbles/jqplayground/commands.go000066400000000000000000000032611451236512400214010ustar00rootroot00000000000000package jqplayground import ( "context" "encoding/json" "fmt" "os" "strings" "github.com/atotto/clipboard" tea "github.com/charmbracelet/bubbletea" "github.com/itchyny/gojq" ) type successMsg struct { message string } type errorMsg struct { error error } type queryResultMsg struct { rawResults string highlightedResults string } type writeToFileMsg struct{} type copyQueryToClipboardMsg struct{} func (b *Bubble) executeQuery(ctx context.Context) tea.Cmd { return func() tea.Msg { query, err := gojq.Parse(b.queryinput.GetInputValue()) if err != nil { return errorMsg{ error: err, } } var msgTemplate interface{} json.Unmarshal(b.inputdata.GetInputJson(), &msgTemplate) var results strings.Builder iter := query.RunWithContext(ctx, msgTemplate) for { v, ok := iter.Next() if !ok { break } if err, ok := v.(error); ok { return errorMsg{ error: err, } } r, _ := gojq.Marshal(v) results.WriteString(fmt.Sprintf("%s\n", string(r))) } highlightedOutput := highlightJson([]byte(results.String()), b.theme.ChromaStyle) return queryResultMsg{ rawResults: results.String(), highlightedResults: highlightedOutput.String(), } } } func (b Bubble) writeOutputToFile() tea.Cmd { return func() tea.Msg { err := os.WriteFile(b.fileselector.GetInput(), []byte(b.results), 0644) if err != nil { return errorMsg{ error: err, } } return writeToFileMsg{} } } func (b Bubble) copyQueryToClipboard() tea.Cmd { return func() tea.Msg { err := clipboard.WriteAll(b.queryinput.GetInputValue()) if err != nil { return errorMsg{ error: err, } } return copyQueryToClipboardMsg{} } } jqp-0.5.0/tui/bubbles/jqplayground/init.go000066400000000000000000000002071451236512400205400ustar00rootroot00000000000000package jqplayground import ( "github.com/charmbracelet/bubbletea" ) func (b Bubble) Init() tea.Cmd { return b.queryinput.Init() } jqp-0.5.0/tui/bubbles/jqplayground/model.go000066400000000000000000000027651451236512400207100ustar00rootroot00000000000000package jqplayground import ( "os" "time" "github.com/noahgorstein/jqp/tui/bubbles/fileselector" "github.com/noahgorstein/jqp/tui/bubbles/help" "github.com/noahgorstein/jqp/tui/bubbles/inputdata" "github.com/noahgorstein/jqp/tui/bubbles/output" "github.com/noahgorstein/jqp/tui/bubbles/queryinput" "github.com/noahgorstein/jqp/tui/bubbles/state" "github.com/noahgorstein/jqp/tui/bubbles/statusbar" "github.com/noahgorstein/jqp/tui/theme" ) func (b Bubble) GetState() state.State { return b.state } type Bubble struct { width int height int workingDirectory string state state.State queryinput queryinput.Bubble inputdata inputdata.Bubble output output.Bubble help help.Bubble statusbar statusbar.Bubble fileselector fileselector.Bubble results string cancel func() theme theme.Theme } func New(inputJson []byte, filename string, theme theme.Theme) Bubble { workingDirectory, _ := os.Getwd() sb := statusbar.New(theme) sb.StatusMessageLifetime = time.Second * 10 fs := fileselector.New(theme) fs.SetInput(workingDirectory) b := Bubble{ workingDirectory: workingDirectory, state: state.Query, queryinput: queryinput.New(theme), inputdata: inputdata.New(inputJson, filename, theme), output: output.New(theme), help: help.New(theme), statusbar: sb, fileselector: fs, theme: theme, } return b } jqp-0.5.0/tui/bubbles/jqplayground/update.go000066400000000000000000000112141451236512400210570ustar00rootroot00000000000000package jqplayground import ( "context" "fmt" "github.com/charmbracelet/bubbles/textinput" "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" "github.com/noahgorstein/jqp/tui/bubbles/state" ) func totalHeight(bubbles ...interface{ View() string }) int { var height int for _, bubble := range bubbles { height += lipgloss.Height(bubble.View()) } return height } func (b *Bubble) resizeBubbles() { b.queryinput.SetWidth(b.width) b.statusbar.SetSize(b.width) b.help.SetWidth(b.width) height := b.height if b.state == state.Save { b.fileselector.SetSize(b.width) height -= totalHeight(b.help, b.queryinput, b.statusbar, b.fileselector) } else { height -= totalHeight(b.help, b.queryinput, b.statusbar) } b.inputdata.SetSize(b.width/2, height) b.output.SetSize(b.width/2, height) } func (b Bubble) Update(msg tea.Msg) (tea.Model, tea.Cmd) { var ( cmd tea.Cmd cmds []tea.Cmd ) prevState := b.state switch msg := msg.(type) { case tea.WindowSizeMsg: b.width = msg.Width b.height = msg.Height b.resizeBubbles() case tea.KeyMsg: switch msg.String() { case tea.KeyCtrlC.String(): if b.state != state.Running { return b, tea.Quit } if b.cancel != nil { b.cancel() b.cancel = nil } b.state = state.Query case tea.KeyTab.String(): if b.state != state.Save { switch b.state { case state.Query: b.state = state.Input case state.Input: b.state = state.Output case state.Output: b.state = state.Query } } case tea.KeyShiftTab.String(): if b.state != state.Save { switch b.state { case state.Query: b.state = state.Output case state.Input: b.state = state.Query case state.Output: b.state = state.Input } } case tea.KeyEsc.String(): if b.state == state.Save { b.state = state.Query } case tea.KeyEnter.String(): if b.state == state.Save { cmd = b.writeOutputToFile() cmds = append(cmds, cmd) } else if b.state == state.Query { b.queryinput.RotateHistory() b.state = state.Running var ctx context.Context ctx, b.cancel = context.WithCancel(context.Background()) cmd = b.executeQuery(ctx) cmds = append(cmds, cmd) } case tea.KeyCtrlS.String(): b.state = state.Save case tea.KeyCtrlY.String(): if b.state != state.Save { cmd = b.copyQueryToClipboard() cmds = append(cmds, cmd) } } case queryResultMsg: b.state = state.Query b.output.ScrollToTop() b.output.SetContent(msg.highlightedResults) b.results = msg.rawResults cmd = b.statusbar.NewStatusMessage("Successfully executed query.", true) cmds = append(cmds, cmd) case writeToFileMsg: b.state = state.Query cmd = b.statusbar.NewStatusMessage(fmt.Sprintf("Successfully wrote results to file: %s", b.fileselector.GetInput()), true) cmds = append(cmds, cmd) b.fileselector.SetInput(b.workingDirectory) case copyQueryToClipboardMsg: cmd = b.statusbar.NewStatusMessage("Successfully copied query to system clipboard.", true) cmds = append(cmds, cmd) case errorMsg: if b.state == state.Running { b.state = state.Query } cmd = b.statusbar.NewStatusMessage(msg.error.Error(), false) cmds = append(cmds, cmd) } if b.state != prevState { switch b.state { case state.Query: b.queryinput.SetBorderColor(b.theme.Primary) b.inputdata.SetBorderColor(b.theme.Inactive) b.output.SetBorderColor(b.theme.Inactive) cmds = append(cmds, textinput.Blink) case state.Input: b.queryinput.SetBorderColor(b.theme.Inactive) b.inputdata.SetBorderColor(b.theme.Primary) b.output.SetBorderColor(b.theme.Inactive) case state.Output: b.queryinput.SetBorderColor(b.theme.Inactive) b.inputdata.SetBorderColor(b.theme.Inactive) b.output.SetBorderColor(b.theme.Primary) case state.Save: b.queryinput.SetBorderColor(b.theme.Inactive) b.inputdata.SetBorderColor(b.theme.Inactive) b.output.SetBorderColor(b.theme.Inactive) } b.help.SetState(b.state) // Help menu may overflow when we switch sections // so we need resize when active section changed. // We also need to resize when file selector (dis)appears. b.resizeBubbles() } switch b.state { case state.Query: b.queryinput, cmd = b.queryinput.Update(msg) cmds = append(cmds, cmd) case state.Input: b.inputdata, cmd = b.inputdata.Update(msg) cmds = append(cmds, cmd) case state.Output: b.output, cmd = b.output.Update(msg) cmds = append(cmds, cmd) case state.Save: b.fileselector, cmd = b.fileselector.Update(msg) cmds = append(cmds, cmd) } b.statusbar, cmd = b.statusbar.Update(msg) cmds = append(cmds, cmd) b.help, cmd = b.help.Update(msg) cmds = append(cmds, cmd) return b, tea.Batch(cmds...) } jqp-0.5.0/tui/bubbles/jqplayground/util.go000066400000000000000000000012441451236512400205540ustar00rootroot00000000000000package jqplayground import ( "bytes" "encoding/json" "github.com/alecthomas/chroma/v2" "github.com/noahgorstein/jqp/tui/utils" ) func isValidJson(input []byte) bool { var js json.RawMessage return json.Unmarshal(input, &js) == nil } func highlightJson(input []byte, chromaStyle *chroma.Style) *bytes.Buffer { if isValidJson(input) { var f interface{} json.Unmarshal(input, &f) var prettyJSON bytes.Buffer json.Indent(&prettyJSON, []byte(input), "", " ") buf := new(bytes.Buffer) utils.HighlightJson(buf, prettyJSON.String(), chromaStyle) return buf } buf := new(bytes.Buffer) utils.HighlightJson(buf, string(input), chromaStyle) return buf } jqp-0.5.0/tui/bubbles/jqplayground/view.go000066400000000000000000000013131451236512400205460ustar00rootroot00000000000000package jqplayground import ( "github.com/charmbracelet/lipgloss" "github.com/noahgorstein/jqp/tui/bubbles/state" ) func (b Bubble) View() string { inputoutput := []string{b.inputdata.View()} if b.width%2 != 0 { inputoutput = append(inputoutput, " ") } inputoutput = append(inputoutput, b.output.View()) if b.state == state.Save { return lipgloss.JoinVertical( lipgloss.Left, b.queryinput.View(), lipgloss.JoinHorizontal(lipgloss.Top, inputoutput...), b.fileselector.View(), b.statusbar.View(), b.help.View()) } return lipgloss.JoinVertical( lipgloss.Left, b.queryinput.View(), lipgloss.JoinHorizontal(lipgloss.Top, inputoutput...), b.statusbar.View(), b.help.View()) } jqp-0.5.0/tui/bubbles/output/000077500000000000000000000000001451236512400160705ustar00rootroot00000000000000jqp-0.5.0/tui/bubbles/output/output.go000066400000000000000000000046451451236512400177700ustar00rootroot00000000000000package output import ( "fmt" "strings" "github.com/charmbracelet/bubbles/viewport" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" "github.com/noahgorstein/jqp/tui/theme" ) type Bubble struct { Ready bool Styles Styles viewport viewport.Model content string height int width int } func New(theme theme.Theme) Bubble { styles := DefaultStyles() styles.containerStyle = styles.containerStyle.BorderForeground(theme.Inactive) styles.infoStyle = styles.infoStyle.BorderForeground(theme.Inactive) v := viewport.New(1, 1) b := Bubble{ Styles: styles, viewport: v, content: "", } return b } func (b *Bubble) SetBorderColor(color lipgloss.TerminalColor) { b.Styles.containerStyle.BorderForeground(color) b.Styles.infoStyle.BorderForeground(color) } func (b *Bubble) SetSize(width, height int) { b.width = width b.height = height b.Styles.containerStyle. Width(width - b.Styles.containerStyle.GetHorizontalFrameSize()/2). Height(height - b.Styles.containerStyle.GetVerticalFrameSize()) b.viewport.Width = width - b.Styles.containerStyle.GetHorizontalFrameSize() - 3 b.viewport.Height = height - b.Styles.containerStyle.GetVerticalFrameSize() - 3 b.SetContent(b.content) } func (b *Bubble) GetContent() string { return b.content } func (b *Bubble) SetContent(content string) { b.content = content wrappedContent := lipgloss.NewStyle().Width(b.viewport.Width - 1).Render(content) b.viewport.SetContent(wrappedContent) } func max(a, b int) int { if a > b { return a } return b } func (b *Bubble) ScrollToTop() { b.viewport.GotoTop() } func (b Bubble) View() string { scrollPercent := fmt.Sprintf("%3.f%%", b.viewport.ScrollPercent()*100) info := b.Styles.infoStyle.Render(fmt.Sprintf("%s | %s", lipgloss.NewStyle().Italic(true).Render("output"), scrollPercent)) line := strings.Repeat(" ", max(0, b.viewport.Width-lipgloss.Width(info))) footer := lipgloss.JoinHorizontal(lipgloss.Center, line, info) content := lipgloss.JoinVertical(lipgloss.Left, b.viewport.View(), footer) return b.Styles.containerStyle.Render(content) } func (b Bubble) Init() tea.Cmd { return nil } func (b Bubble) Update(msg tea.Msg) (Bubble, tea.Cmd) { var ( cmd tea.Cmd cmds []tea.Cmd ) switch msg := msg.(type) { case tea.KeyMsg: switch msg.String() { case "a": } } b.viewport, cmd = b.viewport.Update(msg) cmds = append(cmds, cmd) return b, tea.Batch(cmds...) } jqp-0.5.0/tui/bubbles/output/styles.go000066400000000000000000000005701451236512400177440ustar00rootroot00000000000000package output import ( "github.com/charmbracelet/lipgloss" ) type Styles struct { infoStyle lipgloss.Style containerStyle lipgloss.Style } func DefaultStyles() (s Styles) { s.infoStyle = lipgloss.NewStyle().Bold(true).Border(lipgloss.RoundedBorder()).Padding(0, 1) s.containerStyle = lipgloss.NewStyle().Border(lipgloss.RoundedBorder()).Padding(1) return s } jqp-0.5.0/tui/bubbles/queryinput/000077500000000000000000000000001451236512400167555ustar00rootroot00000000000000jqp-0.5.0/tui/bubbles/queryinput/queryinput.go000066400000000000000000000043141451236512400215330ustar00rootroot00000000000000package queryinput import ( "container/list" "github.com/charmbracelet/bubbles/textinput" tea "github.com/charmbracelet/bubbletea" "github.com/charmbracelet/lipgloss" "github.com/noahgorstein/jqp/tui/theme" ) type Bubble struct { Styles Styles textinput textinput.Model history *list.List historyMaxLen int historySelected *list.Element } func New(theme theme.Theme) Bubble { s := DefaultStyles() s.containerStyle.BorderForeground(theme.Primary) ti := textinput.New() ti.Focus() ti.PromptStyle.Height(1) ti.TextStyle.Height(1) ti.Prompt = lipgloss.NewStyle().Bold(true).Foreground(theme.Secondary).Render("jq > ") return Bubble{ Styles: s, textinput: ti, history: list.New(), historyMaxLen: 512, } } func (b *Bubble) SetBorderColor(color lipgloss.TerminalColor) { b.Styles.containerStyle.BorderForeground(color) } func (b Bubble) GetInputValue() string { return b.textinput.Value() } func (b *Bubble) RotateHistory() { b.history.PushFront(b.textinput.Value()) b.historySelected = b.history.Front() if b.history.Len() > b.historyMaxLen { b.history.Remove(b.history.Back()) } } func (b Bubble) Init() tea.Cmd { return textinput.Blink } func (b *Bubble) SetWidth(width int) { b.Styles.containerStyle.Width(width - b.Styles.containerStyle.GetHorizontalFrameSize()) b.textinput.Width = width - b.Styles.containerStyle.GetHorizontalFrameSize() - 1 } func (b Bubble) View() string { return b.Styles.containerStyle.Render(b.textinput.View()) } func (b Bubble) Update(msg tea.Msg) (Bubble, tea.Cmd) { if msg, ok := msg.(tea.KeyMsg); ok { switch msg.Type { case tea.KeyUp: if b.history.Len() == 0 { break } n := b.historySelected.Next() if n != nil { b.textinput.SetValue(n.Value.(string)) b.textinput.CursorEnd() b.historySelected = n } case tea.KeyDown: if b.history.Len() == 0 { break } p := b.historySelected.Prev() if p != nil { b.textinput.SetValue(p.Value.(string)) b.textinput.CursorEnd() b.historySelected = p } case tea.KeyEnter: b.RotateHistory() } } var ( cmd tea.Cmd cmds []tea.Cmd ) b.textinput, cmd = b.textinput.Update(msg) cmds = append(cmds, cmd) return b, tea.Batch(cmds...) } jqp-0.5.0/tui/bubbles/queryinput/styles.go000066400000000000000000000003641451236512400206320ustar00rootroot00000000000000package queryinput import ( "github.com/charmbracelet/lipgloss" ) type Styles struct { containerStyle lipgloss.Style } func DefaultStyles() (s Styles) { s.containerStyle = lipgloss.NewStyle().Border(lipgloss.RoundedBorder()) return s } jqp-0.5.0/tui/bubbles/state/000077500000000000000000000000001451236512400156505ustar00rootroot00000000000000jqp-0.5.0/tui/bubbles/state/state.go000066400000000000000000000001341451236512400173150ustar00rootroot00000000000000package state type State uint const ( Query State = iota Running Input Output Save ) jqp-0.5.0/tui/bubbles/statusbar/000077500000000000000000000000001451236512400165405ustar00rootroot00000000000000jqp-0.5.0/tui/bubbles/statusbar/statusbar.go000066400000000000000000000031441451236512400211010ustar00rootroot00000000000000package statusbar import ( "time" tea "github.com/charmbracelet/bubbletea" "github.com/noahgorstein/jqp/tui/theme" ) type Bubble struct { styles styles StatusMessageLifetime time.Duration statusMessage string statusMessageTimer *time.Timer } func (b Bubble) Init() tea.Cmd { return nil } func (b Bubble) View() string { return b.styles.containerStyle.Render(b.statusMessage) } func (b *Bubble) SetSize(width int) { b.styles.containerStyle.Width(width) } func (b *Bubble) hideStatusMessage() { b.statusMessage = "" if b.statusMessageTimer != nil { b.statusMessageTimer.Stop() } } func (b Bubble) Update(msg tea.Msg) (Bubble, tea.Cmd) { var cmd tea.Cmd switch msg := msg.(type) { case statusMessageTimeoutMsg: b.hideStatusMessage() case tea.WindowSizeMsg: b.SetSize(msg.Width) } return b, tea.Batch(cmd) } func New(theme theme.Theme) Bubble { styles := defaultStyles() styles.successMessageStyle = styles.successMessageStyle.Foreground(theme.Success) styles.errorMessageStyle = styles.errorMessageStyle.Foreground(theme.Error) b := Bubble{ styles: styles, } return b } type statusMessageTimeoutMsg struct{} func (b *Bubble) NewStatusMessage(s string, success bool) tea.Cmd { if success { b.statusMessage = b.styles.successMessageStyle.Render(s) } else { b.statusMessage = b.styles.errorMessageStyle.Render(s) } if b.statusMessageTimer != nil { b.statusMessageTimer.Stop() } b.statusMessageTimer = time.NewTimer(b.StatusMessageLifetime) // Wait for timeout return func() tea.Msg { <-b.statusMessageTimer.C return statusMessageTimeoutMsg{} } } jqp-0.5.0/tui/bubbles/statusbar/styles.go000066400000000000000000000006101451236512400204070ustar00rootroot00000000000000package statusbar import ( "github.com/charmbracelet/lipgloss" ) type styles struct { containerStyle lipgloss.Style errorMessageStyle lipgloss.Style successMessageStyle lipgloss.Style } func defaultStyles() (s styles) { s.containerStyle = lipgloss.NewStyle().PaddingLeft(1) s.errorMessageStyle = lipgloss.NewStyle() s.successMessageStyle = lipgloss.NewStyle() return s } jqp-0.5.0/tui/theme/000077500000000000000000000000001451236512400142145ustar00rootroot00000000000000jqp-0.5.0/tui/theme/theme.go000066400000000000000000000322361451236512400156530ustar00rootroot00000000000000package theme import ( "strings" "github.com/alecthomas/chroma/v2" "github.com/alecthomas/chroma/v2/styles" "github.com/charmbracelet/lipgloss" ) type CustomTheme struct { Primary string Secondary string Inactive string Success string Error string } var CustomThemeKeys = CustomTheme{ Primary: "primary", Secondary: "secondary", Success: "success", Inactive: "inactive", Error: "error", } const ( BLUE = lipgloss.Color("69") PINK = lipgloss.Color("#F25D94") GREY = lipgloss.Color("240") GREEN = lipgloss.Color("76") RED = lipgloss.Color("9") ) type Theme struct { Primary lipgloss.Color Secondary lipgloss.Color Inactive lipgloss.Color Success lipgloss.Color Error lipgloss.Color ChromaStyle *chroma.Style } func getDefaultTheme() Theme { theme := Theme{ Primary: BLUE, Secondary: PINK, Inactive: GREY, Success: GREEN, Error: RED, ChromaStyle: styles.ParaisoLight, } if lipgloss.HasDarkBackground() { theme.ChromaStyle = styles.Vim } return theme } var ( // from https://www.nordtheme.com/docs/colors-and-palettes nord7 = lipgloss.Color("#8FBCBB") nord9 = lipgloss.Color("#81A1C1") nord11 = lipgloss.Color("#BF616A") nord14 = lipgloss.Color("#A3BE8C") ) var themeMap = map[string]Theme{ "abap": { Primary: lipgloss.Color("#00f"), Secondary: lipgloss.Color("#3af"), Inactive: GREY, Success: lipgloss.Color("#5a2"), Error: lipgloss.Color("#F00"), ChromaStyle: styles.Abap, }, "algol": { Primary: lipgloss.Color("#5a2"), Secondary: lipgloss.Color("#666"), Inactive: GREY, Success: lipgloss.Color("#5a2"), Error: lipgloss.Color("#FF0000"), ChromaStyle: styles.Algol, }, "arduino": { Primary: lipgloss.Color("#1e90ff"), Secondary: lipgloss.Color("#aa5500"), Inactive: GREY, Success: lipgloss.Color("#5a2"), Error: lipgloss.Color("#F00"), ChromaStyle: styles.Arduino, }, "autumn": { Primary: lipgloss.Color("#aa5500"), Secondary: lipgloss.Color("#fcba03"), Inactive: GREY, Success: lipgloss.Color("#009999"), Error: lipgloss.Color("#ff0000"), ChromaStyle: styles.Autumn, }, "average": { Primary: lipgloss.Color("#ec0000"), Secondary: lipgloss.Color("#008900"), Inactive: GREY, Success: lipgloss.Color("#008900"), Error: lipgloss.Color("#ec0000"), ChromaStyle: styles.Average, }, "base16-snazzy": { Primary: lipgloss.Color("#ff6ac1"), Secondary: lipgloss.Color("#5af78e"), Inactive: GREY, Success: lipgloss.Color("#5af78e"), Error: lipgloss.Color("#ff5c57"), ChromaStyle: styles.Base16Snazzy, }, "borland": { Primary: lipgloss.Color("#00f"), Secondary: lipgloss.Color("#000080"), Inactive: GREY, Success: lipgloss.Color("#5a2"), Error: lipgloss.Color("#a61717"), ChromaStyle: styles.Borland, }, "colorful": { Primary: lipgloss.Color("#00d"), Secondary: lipgloss.Color("#070"), Inactive: GREY, Success: lipgloss.Color("#070"), Error: lipgloss.Color("#a61717"), ChromaStyle: styles.Colorful, }, "doom-one": { Primary: lipgloss.Color("#b756ff"), Secondary: lipgloss.Color("#63c381"), Inactive: GREY, Success: lipgloss.Color("#63c381"), Error: lipgloss.Color("#e06c75"), ChromaStyle: styles.DoomOne, }, "doom-one2": { Primary: lipgloss.Color("#76a9f9"), Secondary: lipgloss.Color("#63c381"), Inactive: GREY, Success: lipgloss.Color("#63c381"), Error: lipgloss.Color("#e06c75"), ChromaStyle: styles.DoomOne2, }, "dracula": { Primary: lipgloss.Color("#8be9fd"), Secondary: lipgloss.Color("#ffb86c"), Inactive: GREY, Success: lipgloss.Color("#50fa7b"), Error: lipgloss.Color("#f8f8f2"), ChromaStyle: styles.Dracula, }, "emacs": { Primary: lipgloss.Color("#008000"), Secondary: lipgloss.Color("#a2f"), Inactive: GREY, Success: lipgloss.Color("#008000"), Error: lipgloss.Color("#b44"), ChromaStyle: styles.Emacs, }, "friendly": { Primary: lipgloss.Color("#40a070"), Secondary: lipgloss.Color("#062873"), Inactive: GREY, Success: lipgloss.Color("#40a070"), Error: lipgloss.Color("#FF0000"), ChromaStyle: styles.Friendly, }, "fruity": { Primary: lipgloss.Color("#fb660a"), Secondary: lipgloss.Color("#0086f7"), Inactive: GREY, Success: lipgloss.Color("#40a070"), Error: lipgloss.Color("#FF0000"), ChromaStyle: styles.Fruity, }, "github": { Primary: lipgloss.Color("#d14"), Secondary: lipgloss.Color("#099"), Inactive: GREY, Success: lipgloss.Color("#099"), Error: lipgloss.Color("#d14"), ChromaStyle: styles.GitHub, }, "github-dark": { Primary: lipgloss.Color("#d2a8ff"), Secondary: lipgloss.Color("#f0883e"), Inactive: GREY, Success: lipgloss.Color("#56d364"), Error: lipgloss.Color("#ffa198"), ChromaStyle: styles.GitHubDark, }, "gruvbox": { Primary: lipgloss.Color("#b8bb26"), Secondary: lipgloss.Color("#d3869b"), Inactive: GREY, Success: lipgloss.Color("#b8bb26"), Error: lipgloss.Color("#fb4934"), ChromaStyle: styles.Gruvbox, }, "gruvbox-light": { Primary: lipgloss.Color("#fb4934"), Secondary: lipgloss.Color("#b8bb26"), Inactive: GREY, Success: lipgloss.Color("#b8bb26"), Error: lipgloss.Color("#9D0006"), ChromaStyle: styles.GruvboxLight, }, "hrdark": { Primary: lipgloss.Color("#58a1dd"), Secondary: lipgloss.Color("#ff636f"), Inactive: GREY, Success: lipgloss.Color("#a6be9d"), Error: lipgloss.Color("#FF0000"), ChromaStyle: styles.HrDark, }, "igor": { Primary: lipgloss.Color("#009c00"), Secondary: lipgloss.Color("#00f"), Inactive: GREY, Success: lipgloss.Color("#009c00"), Error: lipgloss.Color("#FF0000"), ChromaStyle: styles.Igor, }, "lovelace": { Primary: lipgloss.Color("#b83838"), Secondary: lipgloss.Color("#2838b0"), Inactive: GREY, Success: lipgloss.Color("#009c00"), Error: lipgloss.Color("#b83838"), ChromaStyle: styles.Igor, }, "manni": { Primary: lipgloss.Color("#c30"), Secondary: lipgloss.Color("#309"), Inactive: GREY, Success: lipgloss.Color("#009c00"), Error: lipgloss.Color("#c30"), ChromaStyle: styles.Manni, }, "monokai": { Primary: lipgloss.Color("#a6e22e"), Secondary: lipgloss.Color("#f92672"), Inactive: GREY, Success: lipgloss.Color("#b4d273"), Error: lipgloss.Color("#960050"), ChromaStyle: styles.Monokai, }, "monokai-light": { Primary: lipgloss.Color("#00a8c8"), Secondary: lipgloss.Color("#f92672"), Inactive: GREY, Success: lipgloss.Color("#b4d273"), Error: lipgloss.Color("#960050"), ChromaStyle: styles.MonokaiLight, }, "murphy": { Primary: lipgloss.Color("#070"), Secondary: lipgloss.Color("#66f"), Inactive: GREY, Success: lipgloss.Color("#070"), Error: lipgloss.Color("#F00"), ChromaStyle: styles.Murphy, }, "native": { Primary: lipgloss.Color("#6ab825"), Secondary: lipgloss.Color("#ed9d13"), Inactive: GREY, Success: lipgloss.Color("#6ab825"), Error: lipgloss.Color("#a61717"), ChromaStyle: styles.Native, }, "nord": { Primary: nord7, Secondary: nord9, Inactive: GREY, Success: nord14, Error: nord11, ChromaStyle: styles.Nord, }, "onesenterprise": { Primary: lipgloss.Color("#00f"), Secondary: lipgloss.Color("#f00"), Inactive: GREY, Success: lipgloss.Color("#6ab825"), Error: lipgloss.Color("#f00"), ChromaStyle: styles.OnesEnterprise, }, "pastie": { Primary: lipgloss.Color("#b06"), Secondary: lipgloss.Color("#00d"), Inactive: GREY, Success: lipgloss.Color("#080"), Error: lipgloss.Color("#d20"), ChromaStyle: styles.Pastie, }, "perldoc": { Primary: lipgloss.Color("#8b008b"), Secondary: lipgloss.Color("#b452cd"), Inactive: GREY, Success: lipgloss.Color("#080"), Error: lipgloss.Color("#cd5555"), ChromaStyle: styles.Perldoc, }, "paradaiso-dark": { Primary: lipgloss.Color("#48b685"), Secondary: lipgloss.Color("#5bc4bf"), Inactive: GREY, Success: lipgloss.Color("#48b685"), Error: lipgloss.Color("#ef6155"), ChromaStyle: styles.ParaisoDark, }, "paradaiso-light": { Primary: lipgloss.Color("#48b685"), Secondary: lipgloss.Color("#815ba4"), Inactive: GREY, Success: lipgloss.Color("#48b685"), Error: lipgloss.Color("#ef6155"), ChromaStyle: styles.ParaisoLight, }, "pygments": { Primary: lipgloss.Color("#008000"), Secondary: lipgloss.Color("#ba2121"), Inactive: GREY, Success: lipgloss.Color("#008000"), Error: lipgloss.Color("#ba2121"), ChromaStyle: styles.Pygments, }, "rainbow_dash": { Primary: lipgloss.Color("#0c6"), Secondary: lipgloss.Color("#5918bb"), Inactive: GREY, Success: lipgloss.Color("#0c6"), Error: lipgloss.Color("#ba2121"), ChromaStyle: styles.RainbowDash, }, "rrt": { Primary: lipgloss.Color("#f60"), Secondary: lipgloss.Color("#87ceeb"), Inactive: GREY, Success: lipgloss.Color("#0c6"), Error: lipgloss.Color("#f00"), ChromaStyle: styles.Rrt, }, "solarized-dark": { Primary: lipgloss.Color("#268bd2"), Secondary: lipgloss.Color("#2aa198"), Inactive: GREY, Success: lipgloss.Color("#0c6"), Error: lipgloss.Color("#cb4b16"), ChromaStyle: styles.SolarizedDark, }, "solarized-dark256": { Primary: lipgloss.Color("#0087ff"), Secondary: lipgloss.Color("#00afaf"), Inactive: GREY, Success: lipgloss.Color("#0c6"), Error: lipgloss.Color("#d75f00"), ChromaStyle: styles.SolarizedDark256, }, "solarized-light": { Primary: lipgloss.Color("#268bd2"), Secondary: lipgloss.Color("#2aa198"), Inactive: GREY, Success: lipgloss.Color("#859900"), Error: lipgloss.Color("#d75f00"), ChromaStyle: styles.SolarizedLight, }, "swapoff": { Primary: lipgloss.Color("#0ff"), Secondary: lipgloss.Color("#ff0"), Inactive: GREY, Success: lipgloss.Color("#e5e5e5"), Error: lipgloss.Color("#e5e5e5"), ChromaStyle: styles.SwapOff, }, "tango": { Primary: lipgloss.Color("#204a87"), Secondary: lipgloss.Color("#0000cf"), Inactive: GREY, Success: lipgloss.Color("#4e9a06"), Error: lipgloss.Color("#a40000"), ChromaStyle: styles.Tango, }, "trac": { Primary: lipgloss.Color("#099"), Secondary: lipgloss.Color("#000080"), Inactive: GREY, Success: lipgloss.Color("#099"), Error: lipgloss.Color("#a61717"), ChromaStyle: styles.Trac, }, "vim": { Primary: lipgloss.Color("#cd00cd"), Secondary: lipgloss.Color("#cdcd00"), Inactive: GREY, Success: lipgloss.Color("#66FF00"), Error: lipgloss.Color("#cd0000"), ChromaStyle: styles.Vim, }, "visual_studio": { Primary: lipgloss.Color("#a31515"), Secondary: lipgloss.Color("#00f"), Inactive: GREY, Success: lipgloss.Color("#023020"), Error: lipgloss.Color("#a31515"), ChromaStyle: styles.VisualStudio, }, "vulcan": { Primary: lipgloss.Color("#bc74c4"), Secondary: lipgloss.Color("#56b6c2"), Inactive: GREY, Success: lipgloss.Color("#82cc6a"), Error: lipgloss.Color("#cf5967"), ChromaStyle: styles.Vulcan, }, "witchhazel": { Primary: lipgloss.Color("#ffb8d1"), Secondary: lipgloss.Color("#56b6c2"), Inactive: GREY, Success: lipgloss.Color("#c2ffdf"), Error: lipgloss.Color("#ffb8d1"), ChromaStyle: styles.WitchHazel, }, "xcode": { Primary: lipgloss.Color("#c41a16"), Secondary: lipgloss.Color("#1c01ce"), Inactive: GREY, Success: lipgloss.Color("#023020"), Error: lipgloss.Color("#c41a16"), ChromaStyle: styles.Xcode, }, "xcode-dark": { Primary: lipgloss.Color("#fc6a5d"), Secondary: lipgloss.Color("#d0bf69"), Inactive: GREY, Success: lipgloss.Color("#90EE90"), Error: lipgloss.Color("#fc6a5d"), ChromaStyle: styles.XcodeDark, }, } // returns a theme by name, and true if default theme was returned func GetTheme(themeName string, styleOverrides map[string]string) (Theme, bool) { lowercasedTheme := strings.ToLower(strings.TrimSpace(themeName)) var isDefault bool var theme Theme if value, ok := themeMap[lowercasedTheme]; ok { theme = value isDefault = false } else { theme = getDefaultTheme() isDefault = true } theme.SetOverrides(styleOverrides) return theme, isDefault && len(styleOverrides) == 0 } func (t *Theme) SetOverrides(overrides map[string]string) { t.Primary = customColorOrDefault(overrides[CustomThemeKeys.Primary], t.Primary) t.Secondary = customColorOrDefault(overrides[CustomThemeKeys.Secondary], t.Secondary) t.Inactive = customColorOrDefault(overrides[CustomThemeKeys.Inactive], t.Inactive) t.Success = customColorOrDefault(overrides[CustomThemeKeys.Success], t.Success) t.Error = customColorOrDefault(overrides[CustomThemeKeys.Error], t.Error) } func customColorOrDefault(color string, def lipgloss.Color) lipgloss.Color { if color == "" { return def } return lipgloss.Color(color) } jqp-0.5.0/tui/utils/000077500000000000000000000000001451236512400142525ustar00rootroot00000000000000jqp-0.5.0/tui/utils/utils.go000066400000000000000000000017721451236512400157500ustar00rootroot00000000000000package utils import ( "io" "github.com/alecthomas/chroma/v2" "github.com/alecthomas/chroma/v2/formatters" "github.com/alecthomas/chroma/v2/lexers" "github.com/alecthomas/chroma/v2/styles" "github.com/charmbracelet/lipgloss" "github.com/muesli/termenv" ) func HighlightJson(w io.Writer, source string, style *chroma.Style) error { l := lexers.Get("json") if l == nil { l = lexers.Fallback } l = chroma.Coalesce(l) f := formatters.Get(getTerminalColorSupport()) if f == nil { f = formatters.Fallback } if style == nil { style = styles.Fallback } it, err := l.Tokenise(nil, source) if err != nil { return err } return f.Format(w, style, it) } // returns a string used for chroma syntax highlighting func getTerminalColorSupport() string { switch lipgloss.ColorProfile() { case termenv.Ascii: return "terminal" case termenv.ANSI: return "terminal16" case termenv.ANSI256: return "terminal256" case termenv.TrueColor: return "terminal16m" default: return "terminal" } }