├── .github ├── FUNDING.yml └── workflows │ └── hotkey.yml ├── .gitignore ├── LICENSE ├── README.md ├── examples ├── ebiten │ └── main.go ├── fyne │ └── main.go ├── gio │ └── main.go ├── glfw │ └── main.go ├── go.mod ├── go.sum ├── minimum │ └── main.go └── multiple │ └── main.go ├── go.mod ├── go.sum ├── hotkey.go ├── hotkey_darwin.go ├── hotkey_darwin.m ├── hotkey_darwin_test.go ├── hotkey_linux.c ├── hotkey_linux.go ├── hotkey_linux_test.go ├── hotkey_nocgo.go ├── hotkey_nocgo_test.go ├── hotkey_test.go ├── hotkey_windows.go ├── hotkey_windows_test.go ├── internal └── win │ └── hotkey.go ├── mainthread ├── doc.go ├── os.go ├── os_darwin.go └── os_darwin.m └── vendor ├── golang.design └── x │ └── mainthread │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ └── mainthread.go └── modules.txt /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [changkun] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] -------------------------------------------------------------------------------- /.github/workflows/hotkey.yml: -------------------------------------------------------------------------------- 1 | # Copyright 2021 The golang.design Initiative Authors. 2 | # All rights reserved. Use of this source code is governed 3 | # by a MIT license that can be found in the LICENSE file. 4 | # 5 | # Written by Changkun Ou 6 | 7 | name: hotkey 8 | 9 | on: 10 | push: 11 | branches: [ main ] 12 | pull_request: 13 | branches: [ main ] 14 | 15 | jobs: 16 | platform_test: 17 | env: 18 | DISPLAY: ':0.0' 19 | runs-on: ${{ matrix.os }} 20 | strategy: 21 | fail-fast: false 22 | matrix: 23 | os: [ubuntu-latest, macos-latest, windows-latest] 24 | go: ['1.17.x', '1.18.x', '1.19.x'] 25 | steps: 26 | - name: Install and run dependencies (xvfb libx11-dev) 27 | if: ${{ runner.os == 'Linux' }} 28 | run: | 29 | sudo apt update 30 | sudo apt install -y xvfb libx11-dev x11-utils libegl1-mesa-dev libgles2-mesa-dev 31 | Xvfb :0 -screen 0 1024x768x24 > /dev/null 2>&1 & 32 | # Wait for Xvfb 33 | MAX_ATTEMPTS=120 # About 60 seconds 34 | COUNT=0 35 | echo -n "Waiting for Xvfb to be ready..." 36 | while ! xdpyinfo -display "${DISPLAY}" >/dev/null 2>&1; do 37 | echo -n "." 38 | sleep 0.50s 39 | COUNT=$(( COUNT + 1 )) 40 | if [ "${COUNT}" -ge "${MAX_ATTEMPTS}" ]; then 41 | echo " Gave up waiting for X server on ${DISPLAY}" 42 | exit 1 43 | fi 44 | done 45 | echo "Done - Xvfb is ready!" 46 | - uses: actions/checkout@v2 47 | - uses: actions/setup-go@v2 48 | with: 49 | stable: 'false' 50 | go-version: ${{ matrix.go }} 51 | 52 | - name: Run Tests with CGO_ENABLED=1 53 | if: ${{ runner.os == 'Linux' || runner.os == 'macOS'}} 54 | run: | 55 | CGO_ENABLED=1 go test -v -covermode=atomic . 56 | 57 | - name: Run Tests with CGO_ENABLED=0 58 | if: ${{ runner.os == 'Linux' || runner.os == 'macOS'}} 59 | run: | 60 | CGO_ENABLED=0 go test -v -covermode=atomic . 61 | 62 | - name: Run Tests on Windows 63 | if: ${{ runner.os == 'Windows'}} 64 | run: | 65 | go test -v -covermode=atomic . -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, built with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Dependency directories (remove the comment below to include it) 15 | # vendor/ 16 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Changkun Ou 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hotkey [![PkgGoDev](https://pkg.go.dev/badge/golang.design/x/hotkey)](https://pkg.go.dev/golang.design/x/hotkey) ![](https://changkun.de/urlstat?mode=github&repo=golang-design/hotkey) ![hotkey](https://github.com/golang-design/hotkey/workflows/hotkey/badge.svg?branch=main) 2 | 3 | cross platform hotkey package in Go 4 | 5 | ```go 6 | import "golang.design/x/hotkey" 7 | ``` 8 | 9 | ## Features 10 | 11 | - Cross platform supports: macOS, Linux (X11), and Windows 12 | - Global hotkey registration without focus on a window 13 | 14 | ## API Usage 15 | 16 | Package hotkey provides the basic facility to register a system-level 17 | global hotkey shortcut so that an application can be notified if a user 18 | triggers the desired hotkey. A hotkey must be a combination of modifiers 19 | and a single key. 20 | 21 | ```go 22 | package main 23 | 24 | import ( 25 | "log" 26 | 27 | "golang.design/x/hotkey" 28 | "golang.design/x/hotkey/mainthread" 29 | ) 30 | 31 | func main() { mainthread.Init(fn) } // Not necessary when use in Fyne, Ebiten or Gio. 32 | func fn() { 33 | hk := hotkey.New([]hotkey.Modifier{hotkey.ModCtrl, hotkey.ModShift}, hotkey.KeyS) 34 | err := hk.Register() 35 | if err != nil { 36 | log.Fatalf("hotkey: failed to register hotkey: %v", err) 37 | return 38 | } 39 | 40 | log.Printf("hotkey: %v is registered\n", hk) 41 | <-hk.Keydown() 42 | log.Printf("hotkey: %v is down\n", hk) 43 | <-hk.Keyup() 44 | log.Printf("hotkey: %v is up\n", hk) 45 | hk.Unregister() 46 | log.Printf("hotkey: %v is unregistered\n", hk) 47 | } 48 | ``` 49 | 50 | Note platform specific details: 51 | 52 | - On macOS, due to the OS restriction (other platforms does not have this 53 | restriction), hotkey events must be handled on the "main thread". 54 | Therefore, in order to use this package properly, one must start an OS 55 | main event loop on the main thread, For self-contained applications, 56 | using [golang.design/x/hotkey/mainthread](https://pkg.go.dev/golang.design/x/hotkey/mainthread) 57 | is possible. It is uncessary or applications based on other GUI frameworks, 58 | such as fyne, ebiten, or Gio. See the "[./examples](./examples)" folder 59 | for more examples. 60 | - On Linux (X11), when AutoRepeat is enabled in the X server, the Keyup 61 | is triggered automatically and continuously as Keydown continues. 62 | - On Linux (X11), some keys may be mapped to multiple Mod keys. To 63 | correctly register the key combination, one must use the correct 64 | underlying keycode combination. For example, a regular Ctrl+Alt+S 65 | might be registered as: Ctrl+Mod2+Mod4+S. 66 | - If this package did not include a desired key, one can always provide 67 | the keycode to the API. For example, if a key code is 0x15, then the 68 | corresponding key is `hotkey.Key(0x15)`. 69 | 70 | ## Examples 71 | 72 | | Description | Folder | 73 | |:------------|:------:| 74 | | A minimum example | [minimum](./examples/minimum/main.go) | 75 | | Register multiple hotkeys | [multiple](./examples/multiple/main.go) | 76 | | A example to use in GLFW | [glfw](./examples/glfw/main.go) | 77 | | A example to use in Fyne | [fyne](./examples/fyne/main.go) | 78 | | A example to use in Ebiten | [ebiten](./examples/ebiten/main.go) | 79 | | A example to use in Gio | [gio](./examples/gio/main.go) | 80 | 81 | ## Who is using this package? 82 | 83 | The main purpose of building this package is to support the 84 | [midgard](https://changkun.de/s/midgard) project. 85 | 86 | To know more projects, check our [wiki](https://github.com/golang-design/hotkey/wiki) page. 87 | 88 | ## License 89 | 90 | MIT | © 2021 The golang.design Initiative Authors, written by [Changkun Ou](https://changkun.de). -------------------------------------------------------------------------------- /examples/ebiten/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import ( 8 | "log" 9 | 10 | "github.com/hajimehoshi/ebiten/v2" 11 | "golang.design/x/hotkey" 12 | ) 13 | 14 | type Game struct{} 15 | 16 | func (g *Game) Update() error { 17 | return nil 18 | } 19 | 20 | func (g *Game) Draw(screen *ebiten.Image) { 21 | } 22 | 23 | func (g *Game) Layout(outsideWidth, outsideHeight int) (screenWidth, screenHeight int) { 24 | return 320, 240 25 | } 26 | 27 | func main() { 28 | game := &Game{} 29 | ebiten.SetWindowSize(640, 480) 30 | ebiten.SetWindowTitle("Ebiten Game") 31 | go reghk() 32 | 33 | if err := ebiten.RunGame(game); err != nil { 34 | log.Fatal(err) 35 | } 36 | } 37 | 38 | func reghk() { 39 | // Register a desired hotkey. 40 | hk := hotkey.New([]hotkey.Modifier{hotkey.ModCtrl, hotkey.ModShift}, hotkey.KeyS) 41 | 42 | if err := hk.Register(); err != nil { 43 | log.Println("failed to register hotkey: %v", err) 44 | return 45 | } 46 | 47 | // Unregister the hotkey when keydown event is triggered 48 | <-hk.Keydown() 49 | log.Println("the registered hotkey is triggered.") 50 | 51 | hk.Unregister() 52 | } 53 | -------------------------------------------------------------------------------- /examples/fyne/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import ( 8 | "fyne.io/fyne/v2" 9 | "fyne.io/fyne/v2/app" 10 | "fyne.io/fyne/v2/container" 11 | "fyne.io/fyne/v2/widget" 12 | "golang.design/x/hotkey" 13 | ) 14 | 15 | func main() { 16 | w := app.New().NewWindow("golang.design/x/hotkey") 17 | label := widget.NewLabel("Hello golang.design!") 18 | button := widget.NewButton("Hi!", func() { label.SetText("Welcome :)") }) 19 | w.SetContent(container.NewVBox(label, button)) 20 | 21 | go func() { 22 | // Register a desired hotkey. 23 | hk := hotkey.New([]hotkey.Modifier{hotkey.ModCtrl, hotkey.ModShift}, hotkey.KeyS) 24 | if err := hk.Register(); err != nil { 25 | panic("hotkey registration failed") 26 | } 27 | // Start listen hotkey event whenever it is ready. 28 | for range hk.Keydown() { 29 | button.Tapped(&fyne.PointEvent{}) 30 | } 31 | }() 32 | 33 | w.ShowAndRun() 34 | } 35 | -------------------------------------------------------------------------------- /examples/gio/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import ( 8 | "os" 9 | 10 | "gioui.org/app" 11 | "gioui.org/unit" 12 | "golang.design/x/hotkey" 13 | ) 14 | 15 | func main() { 16 | go fn() 17 | app.Main() 18 | } 19 | 20 | func fn() { 21 | w := app.NewWindow(app.Title("golang.design/x/hotkey"), app.Size(unit.Dp(200), unit.Dp(200))) 22 | 23 | go reghk() 24 | 25 | for range w.Events() { 26 | } 27 | } 28 | 29 | func reghk() { 30 | // Register a desired hotkey. 31 | hk := hotkey.New([]hotkey.Modifier{hotkey.ModCtrl, hotkey.ModShift}, hotkey.KeyS) 32 | if err := hk.Register(); err != nil { 33 | panic("hotkey registration failed") 34 | } 35 | 36 | // Unregister the hotkey when keydown event is triggered 37 | for range hk.Keydown() { 38 | hk.Unregister() 39 | } 40 | 41 | // Exist the app. 42 | os.Exit(0) 43 | } 44 | -------------------------------------------------------------------------------- /examples/glfw/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import ( 8 | "fmt" 9 | "runtime" 10 | 11 | "github.com/go-gl/glfw/v3.3/glfw" 12 | "golang.design/x/hotkey" 13 | ) 14 | 15 | func init() { 16 | runtime.LockOSThread() 17 | } 18 | 19 | func main() { 20 | err := glfw.Init() 21 | if err != nil { 22 | panic(err) 23 | } 24 | defer glfw.Terminate() 25 | window, err := glfw.CreateWindow(640, 480, "golang.design/x/hotkey", nil, nil) 26 | if err != nil { 27 | panic(err) 28 | } 29 | 30 | go func() { 31 | // Register a desired hotkey. 32 | hk := hotkey.New([]hotkey.Modifier{hotkey.ModCtrl, hotkey.ModShift}, hotkey.KeyS) 33 | if err := hk.Register(); err != nil { 34 | panic("hotkey registration failed") 35 | } 36 | // Start listen hotkey event whenever it is ready. 37 | for range hk.Keydown() { 38 | fmt.Println("keydown!") 39 | } 40 | }() 41 | 42 | window.MakeContextCurrent() 43 | for !window.ShouldClose() { 44 | window.SwapBuffers() 45 | glfw.PollEvents() 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /examples/go.mod: -------------------------------------------------------------------------------- 1 | module golang.design/x/hotkey/examples 2 | 3 | go 1.19 4 | 5 | require ( 6 | fyne.io/fyne/v2 v2.3.0 7 | gioui.org v0.0.0-20221223153152-aa2a948b863a 8 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b 9 | github.com/hajimehoshi/ebiten/v2 v2.4.15 10 | golang.design/x/hotkey v0.4.0 11 | ) 12 | 13 | require ( 14 | fyne.io/systray v1.10.1-0.20221115204952-d16a6177e6f1 // indirect 15 | gioui.org/cpu v0.0.0-20210817075930-8d6a761490d2 // indirect 16 | gioui.org/shader v1.0.6 // indirect 17 | github.com/benoitkugler/textlayout v0.3.0 // indirect 18 | github.com/davecgh/go-spew v1.1.1 // indirect 19 | github.com/ebitengine/purego v0.0.0-20220905075623-aeed57cda744 // indirect 20 | github.com/fredbi/uri v0.1.0 // indirect 21 | github.com/fsnotify/fsnotify v1.5.4 // indirect 22 | github.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe // indirect 23 | github.com/fyne-io/glfw-js v0.0.0-20220120001248-ee7290d23504 // indirect 24 | github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2 // indirect 25 | github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6 // indirect 26 | github.com/go-text/typesetting v0.0.0-20221214153724-0399769901d5 // indirect 27 | github.com/godbus/dbus/v5 v5.1.0 // indirect 28 | github.com/goki/freetype v0.0.0-20220119013949-7a161fd3728c // indirect 29 | github.com/gopherjs/gopherjs v1.17.2 // indirect 30 | github.com/hajimehoshi/file2byteslice v0.0.0-20210813153925-5340248a8f41 // indirect 31 | github.com/jezek/xgb v1.0.1 // indirect 32 | github.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e // indirect 33 | github.com/pmezard/go-difflib v1.0.0 // indirect 34 | github.com/srwiley/oksvg v0.0.0-20220731023508-a61f04f16b76 // indirect 35 | github.com/srwiley/rasterx v0.0.0-20210519020934-456a8d69b780 // indirect 36 | github.com/stretchr/testify v1.8.0 // indirect 37 | github.com/tevino/abool v1.2.0 // indirect 38 | github.com/yuin/goldmark v1.4.13 // indirect 39 | golang.design/x/mainthread v0.3.0 // indirect 40 | golang.org/x/exp v0.0.0-20221012211006-4de253d81b95 // indirect 41 | golang.org/x/exp/shiny v0.0.0-20220827204233-334a2380cb91 // indirect 42 | golang.org/x/image v0.1.0 // indirect 43 | golang.org/x/mobile v0.0.0-20220722155234-aaac322e2105 // indirect 44 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect 45 | golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64 // indirect 46 | golang.org/x/text v0.4.0 // indirect 47 | gopkg.in/yaml.v3 v3.0.1 // indirect 48 | honnef.co/go/js/dom v0.0.0-20210725211120-f030747120f2 // indirect 49 | ) 50 | 51 | replace golang.design/x/hotkey => ../ 52 | -------------------------------------------------------------------------------- /examples/go.sum: -------------------------------------------------------------------------------- 1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 2 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= 3 | cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= 4 | cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= 5 | cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= 6 | cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= 7 | cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= 8 | cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= 9 | cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= 10 | cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= 11 | cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= 12 | cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= 13 | cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= 14 | cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= 15 | cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= 16 | cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= 17 | cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= 18 | cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg= 19 | cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8= 20 | cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0= 21 | cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= 22 | cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= 23 | cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= 24 | cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= 25 | cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= 26 | cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= 27 | cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= 28 | cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= 29 | cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= 30 | cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= 31 | cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= 32 | cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= 33 | cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= 34 | cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= 35 | cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= 36 | cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= 37 | cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= 38 | cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= 39 | dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= 40 | eliasnaur.com/font v0.0.0-20220124212145-832bb8fc08c3 h1:djFprmHZgrSepsHAIRMp5UJn3PzsoTg9drI+BDmif5Q= 41 | fyne.io/fyne/v2 v2.3.0 h1:g9tPI3lyBK50IvyPbXqv2zI3JJ4uhMAffu89f3nX5PU= 42 | fyne.io/fyne/v2 v2.3.0/go.mod h1:odfJmbFnODiKn1MXdL44JR6CK+0v8lrmgdPlrUF6w0M= 43 | fyne.io/systray v1.10.1-0.20221115204952-d16a6177e6f1 h1:OiHw+bZAGEaSreHsA8dDkBOVJmSFzsNTOc/htpM+fOc= 44 | fyne.io/systray v1.10.1-0.20221115204952-d16a6177e6f1/go.mod h1:oM2AQqGJ1AMo4nNqZFYU8xYygSBZkW2hmdJ7n4yjedE= 45 | gioui.org v0.0.0-20221223153152-aa2a948b863a h1:Tv0ZdLLS8zkWgxFFOBXR/RSp4YvFzk7f7B9000lzo94= 46 | gioui.org v0.0.0-20221223153152-aa2a948b863a/go.mod h1:3lLo7xMHYnnHTrgKNNctBjEKKH3wQCO2Sn7ti5Jy8mU= 47 | gioui.org/cpu v0.0.0-20210808092351-bfe733dd3334/go.mod h1:A8M0Cn5o+vY5LTMlnRoK3O5kG+rH0kWfJjeKd9QpBmQ= 48 | gioui.org/cpu v0.0.0-20210817075930-8d6a761490d2 h1:AGDDxsJE1RpcXTAxPG2B4jrwVUJGFDjINIPi1jtO6pc= 49 | gioui.org/cpu v0.0.0-20210817075930-8d6a761490d2/go.mod h1:A8M0Cn5o+vY5LTMlnRoK3O5kG+rH0kWfJjeKd9QpBmQ= 50 | gioui.org/shader v1.0.6 h1:cvZmU+eODFR2545X+/8XucgZdTtEjR3QWW6W65b0q5Y= 51 | gioui.org/shader v1.0.6/go.mod h1:mWdiME581d/kV7/iEhLmUgUK5iZ09XR5XpduXzbePVM= 52 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= 53 | github.com/BurntSushi/toml v1.1.0/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= 54 | github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= 55 | github.com/akavel/rsrc v0.10.2/go.mod h1:uLoCtb9J+EyAqh+26kdrTgmzRBFPGOolLWKpdxkKq+c= 56 | github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= 57 | github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= 58 | github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= 59 | github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= 60 | github.com/benoitkugler/pstokenizer v1.0.0/go.mod h1:l1G2Voirz0q/jj0TQfabNxVsa8HZXh/VMxFSRALWTiE= 61 | github.com/benoitkugler/textlayout v0.3.0 h1:2ehWXEkgb6RUokTjXh1LzdGwG4dRP6X3dqhYYDYhUVk= 62 | github.com/benoitkugler/textlayout v0.3.0/go.mod h1:o+1hFV+JSHBC9qNLIuwVoLedERU7sBPgEFcuSgfvi/w= 63 | github.com/benoitkugler/textlayout-testdata v0.1.1 h1:AvFxBxpfrQd8v55qH59mZOJOQjtD6K2SFe9/HvnIbJk= 64 | github.com/benoitkugler/textlayout-testdata v0.1.1/go.mod h1:i/qZl09BbUOtd7Bu/W1CAubRwTWrEXWq6JwMkw8wYxo= 65 | github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kBD4zp0CCIs= 66 | github.com/bketelsen/crypt v0.0.4/go.mod h1:aI6NrJ0pMGgvZKL1iVgXLnfIFJtfV+bKCoqOes/6LfM= 67 | github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= 68 | github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= 69 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= 70 | github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= 71 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw= 72 | github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc= 73 | github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 74 | github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= 75 | github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= 76 | github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= 77 | github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= 78 | github.com/cpuguy83/go-md2man/v2 v2.0.1/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= 79 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 80 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= 81 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 82 | github.com/ebitengine/purego v0.0.0-20220905075623-aeed57cda744 h1:A8UnJ/5OKzki4HBDwoRQz7I6sxKsokpMXcGh+fUxpfc= 83 | github.com/ebitengine/purego v0.0.0-20220905075623-aeed57cda744/go.mod h1:Eh8I3yvknDYZeCuXH9kRNaPuHEwvXDCk378o9xszmHg= 84 | github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 85 | github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= 86 | github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98= 87 | github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= 88 | github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= 89 | github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= 90 | github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= 91 | github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= 92 | github.com/fredbi/uri v0.1.0 h1:8XBBD74STBLcWJ5smjEkKCZivSxSKMhFB0FbQUKeNyM= 93 | github.com/fredbi/uri v0.1.0/go.mod h1:1xC40RnIOGCaQzswaOvrzvG/3M3F0hyDVb3aO/1iGy0= 94 | github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= 95 | github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI= 96 | github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU= 97 | github.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe h1:A/wiwvQ0CAjPkuJytaD+SsXkPU0asQ+guQEIg1BJGX4= 98 | github.com/fyne-io/gl-js v0.0.0-20220119005834-d2da28d9ccfe/go.mod h1:d4clgH0/GrRwWjRzJJQXxT/h1TyuNSfF/X64zb/3Ggg= 99 | github.com/fyne-io/glfw-js v0.0.0-20220120001248-ee7290d23504 h1:+31CdF/okdokeFNoy9L/2PccG3JFidQT3ev64/r4pYU= 100 | github.com/fyne-io/glfw-js v0.0.0-20220120001248-ee7290d23504/go.mod h1:gLRWYfYnMA9TONeppRSikMdXlHQ97xVsPojddUv3b/E= 101 | github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2 h1:hnLq+55b7Zh7/2IRzWCpiTcAvjv/P8ERF+N7+xXbZhk= 102 | github.com/fyne-io/image v0.0.0-20220602074514-4956b0afb3d2/go.mod h1:eO7W361vmlPOrykIg+Rsh1SZ3tQBaOsfzZhsIOb/Lm0= 103 | github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= 104 | github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6 h1:zDw5v7qm4yH7N8C8uWd+8Ii9rROdgWxQuGoJ9WDXxfk= 105 | github.com/go-gl/gl v0.0.0-20211210172815-726fda9656d6/go.mod h1:9YTyiznxEY1fVinfM7RvRcjRHbw2xLBJ3AAGIT0I4Nw= 106 | github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= 107 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 108 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 109 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20211213063430-748e38ca8aec/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 110 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20220806181222-55e207c401ad/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 111 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b h1:GgabKamyOYguHqHjSkDACcgoPIz3w0Dis/zJ1wyHHHU= 112 | github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= 113 | github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= 114 | github.com/go-text/typesetting v0.0.0-20221212183139-1eb938670a1f/go.mod h1:/cmOXaoTiO+lbCwkTZBgCvevJpbFsZ5reXIpEJVh5MI= 115 | github.com/go-text/typesetting v0.0.0-20221214153724-0399769901d5 h1:iOA0HmtpANn48hX2nlDNMu0VVaNza35HJG0WeetBVzQ= 116 | github.com/go-text/typesetting v0.0.0-20221214153724-0399769901d5/go.mod h1:/cmOXaoTiO+lbCwkTZBgCvevJpbFsZ5reXIpEJVh5MI= 117 | github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= 118 | github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk= 119 | github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= 120 | github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= 121 | github.com/goki/freetype v0.0.0-20220119013949-7a161fd3728c h1:JGCm/+tJ9gC6THUxooTldS+CUDsba0qvkvU3DHklqW8= 122 | github.com/goki/freetype v0.0.0-20220119013949-7a161fd3728c/go.mod h1:wfqRWLHRBsRgkp5dmbG56SA0DmVtwrF5N3oPdI8t+Aw= 123 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= 124 | github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 125 | github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 126 | github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= 127 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 128 | github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= 129 | github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= 130 | github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 131 | github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 132 | github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= 133 | github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= 134 | github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8= 135 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 136 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 137 | github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= 138 | github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 139 | github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= 140 | github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= 141 | github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= 142 | github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= 143 | github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= 144 | github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= 145 | github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= 146 | github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= 147 | github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 148 | github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= 149 | github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= 150 | github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM= 151 | github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= 152 | github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 153 | github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= 154 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= 155 | github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 156 | github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= 157 | github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 158 | github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 159 | github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 160 | github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 161 | github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 162 | github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 163 | github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 164 | github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 165 | github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= 166 | github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= 167 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= 168 | github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= 169 | github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= 170 | github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 171 | github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= 172 | github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 173 | github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 174 | github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 175 | github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 176 | github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= 177 | github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 178 | github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 179 | github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 180 | github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= 181 | github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= 182 | github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= 183 | github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= 184 | github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= 185 | github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= 186 | github.com/gopherjs/gopherjs v0.0.0-20211219123610-ec9572f70e60/go.mod h1:cz9oNYuRUWGdHmLF2IodMLkAhcPtXeULvcBNagUrxTI= 187 | github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g= 188 | github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= 189 | github.com/goxjs/gl v0.0.0-20210104184919-e3fafc6f8f2a/go.mod h1:dy/f2gjY09hwVfIyATps4G2ai7/hLwLkc5TrPqONuXY= 190 | github.com/goxjs/glfw v0.0.0-20191126052801-d2efb5f20838/go.mod h1:oS8P8gVOT4ywTcjV6wZlOU4GuVFQ8F5328KY3MJ79CY= 191 | github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= 192 | github.com/hajimehoshi/bitmapfont/v2 v2.2.2/go.mod h1:Ua/x9Dkz7M9CU4zr1VHWOqGwjKdXbOTRsH7lWfb1Co0= 193 | github.com/hajimehoshi/ebiten/v2 v2.4.15 h1:yvhCrDv9y7TpdHtdux5ES/IwP6Pfplz5rJVxE0Z+ZPU= 194 | github.com/hajimehoshi/ebiten/v2 v2.4.15/go.mod h1:BZcqCU4XHmScUi+lsKexocWcf4offMFwfp8dVGIB/G4= 195 | github.com/hajimehoshi/file2byteslice v0.0.0-20210813153925-5340248a8f41 h1:s01qIIRG7vN/5ndLwkDktjx44ulFk6apvAjVBYR50Yo= 196 | github.com/hajimehoshi/file2byteslice v0.0.0-20210813153925-5340248a8f41/go.mod h1:CqqAHp7Dk/AqQiwuhV1yT2334qbA/tFWQW0MD2dGqUE= 197 | github.com/hajimehoshi/go-mp3 v0.3.3/go.mod h1:qMJj/CSDxx6CGHiZeCgbiq2DSUkbK0UbtXShQcnfyMM= 198 | github.com/hajimehoshi/oto v0.6.1/go.mod h1:0QXGEkbuJRohbJaxr7ZQSxnju7hEhseiPx2hrh6raOI= 199 | github.com/hajimehoshi/oto/v2 v2.3.1/go.mod h1:seWLbgHH7AyUMYKfKYT9pg7PhUu9/SisyJvNTT+ASQo= 200 | github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= 201 | github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= 202 | github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= 203 | github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= 204 | github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= 205 | github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= 206 | github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= 207 | github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= 208 | github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= 209 | github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= 210 | github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= 211 | github.com/hashicorp/go-uuid v1.0.1/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= 212 | github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= 213 | github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 214 | github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= 215 | github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= 216 | github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= 217 | github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= 218 | github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= 219 | github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= 220 | github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 221 | github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= 222 | github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= 223 | github.com/jackmordaunt/icns/v2 v2.2.1/go.mod h1:6aYIB9eSzyfHHMKqDf17Xrs1zetQPReAkiUSHzdw4cI= 224 | github.com/jakecoffman/cp v1.2.1/go.mod h1:JjY/Fp6d8E1CHnu74gWNnU0+b9VzEdUVPoJxg2PsTQg= 225 | github.com/jezek/xgb v1.0.1 h1:YUGhxps0aR7J2Xplbs23OHnV1mWaxFVcOl9b+1RQkt8= 226 | github.com/jezek/xgb v1.0.1/go.mod h1:nrhwO0FX/enq75I7Y7G8iN1ubpSGZEiA3v9e9GyRFlk= 227 | github.com/jfreymuth/oggvorbis v1.0.4/go.mod h1:1U4pqWmghcoVsCJJ4fRBKv9peUJMBHixthRlBeD6uII= 228 | github.com/jfreymuth/vorbis v1.0.2/go.mod h1:DoftRo4AznKnShRl1GxiTFCseHr4zR9BN3TWXyuzrqQ= 229 | github.com/josephspurrier/goversioninfo v1.4.0/go.mod h1:JWzv5rKQr+MmW+LvM412ToT/IkYDZjaclF2pKDss8IY= 230 | github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= 231 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= 232 | github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= 233 | github.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e h1:LvL4XsI70QxOGHed6yhQtAU34Kx3Qq2wwBzGFKY8zKk= 234 | github.com/jsummers/gobmp v0.0.0-20151104160322-e2ba15ffa76e/go.mod h1:kLgvv7o6UM+0QSf0QjAse3wReFDsb9qbZJdfexWlrQw= 235 | github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= 236 | github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= 237 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= 238 | github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= 239 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= 240 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= 241 | github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= 242 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= 243 | github.com/lucor/goinfo v0.0.0-20210802170112-c078a2b0f08b/go.mod h1:PRq09yoB+Q2OJReAmwzKivcYyremnibWGbK7WfftHzc= 244 | github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPKd5NZ3oSwXrF60= 245 | github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= 246 | github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= 247 | github.com/mcuadros/go-version v0.0.0-20190830083331-035f6764e8d2/go.mod h1:76rfSfYPWj01Z85hUf/ituArm797mNKcvINh1OlsZKo= 248 | github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= 249 | github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= 250 | github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= 251 | github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= 252 | github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg= 253 | github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0QubkSMEySY= 254 | github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 255 | github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= 256 | github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= 257 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= 258 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 259 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= 260 | github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo= 261 | github.com/neelance/sourcemap v0.0.0-20200213170602-2833bce08e4c/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM= 262 | github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646/go.mod h1:jpp1/29i3P1S/RLdc7JQKbRpFeM1dOBd8T9ki5s+AY8= 263 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= 264 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= 265 | github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= 266 | github.com/pelletier/go-toml v1.9.3/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= 267 | github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= 268 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= 269 | github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZI= 270 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 271 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 272 | github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= 273 | github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= 274 | github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= 275 | github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= 276 | github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 277 | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= 278 | github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= 279 | github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= 280 | github.com/shurcooL/go v0.0.0-20200502201357-93f07166e636/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= 281 | github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= 282 | github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= 283 | github.com/shurcooL/vfsgen v0.0.0-20200824052919-0d455de96546/go.mod h1:TrYk7fJVaAttu97ZZKrO9UbRa8izdowaMIZcxYMbVaw= 284 | github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= 285 | github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= 286 | github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= 287 | github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= 288 | github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= 289 | github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk= 290 | github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo= 291 | github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= 292 | github.com/spf13/viper v1.8.1/go.mod h1:o0Pch8wJ9BVSWGQMbra6iw0oQ5oktSIBaujf1rJH9Ns= 293 | github.com/srwiley/oksvg v0.0.0-20220731023508-a61f04f16b76 h1:Ga2uagHhDeGysCixLAzH0mS2TU+CrbQavmsHUNkEEVA= 294 | github.com/srwiley/oksvg v0.0.0-20220731023508-a61f04f16b76/go.mod h1:cNQ3dwVJtS5Hmnjxy6AgTPd0Inb3pW05ftPSX7NZO7Q= 295 | github.com/srwiley/rasterx v0.0.0-20210519020934-456a8d69b780 h1:oDMiXaTMyBEuZMU53atpxqYsSB3U1CHkeAu2zr6wTeY= 296 | github.com/srwiley/rasterx v0.0.0-20210519020934-456a8d69b780/go.mod h1:mvWM0+15UqyrFKqdRjY6LuAVJR0HOVhJlEgZ5JWtSWU= 297 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 298 | github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= 299 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= 300 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 301 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= 302 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 303 | github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 304 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 305 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= 306 | github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk= 307 | github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= 308 | github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= 309 | github.com/tevino/abool v1.2.0 h1:heAkClL8H6w+mK5md9dzsuohKeXHUpY7Vw0ZCKW+huA= 310 | github.com/tevino/abool v1.2.0/go.mod h1:qc66Pna1RiIsPa7O4Egxxs9OqkuxDX55zznh9K07Tzg= 311 | github.com/urfave/cli/v2 v2.4.0/go.mod h1:NX9W0zmTvedE5oDoOMs2RTC8RvdK98NTYZE5LbaEYPg= 312 | github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 313 | github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 314 | github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 315 | github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= 316 | github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 317 | github.com/yuin/goldmark v1.4.0/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= 318 | github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= 319 | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= 320 | go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= 321 | go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= 322 | go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= 323 | go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= 324 | go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= 325 | go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 326 | go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 327 | go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= 328 | go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= 329 | go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= 330 | go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= 331 | go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= 332 | go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= 333 | golang.design/x/mainthread v0.3.0 h1:UwFus0lcPodNpMOGoQMe87jSFwbSsEY//CA7yVmu4j8= 334 | golang.design/x/mainthread v0.3.0/go.mod h1:vYX7cF2b3pTJMGM/hc13NmN6kblKnf4/IyvHeu259L0= 335 | golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= 336 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= 337 | golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 338 | golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 339 | golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 340 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= 341 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= 342 | golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 343 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= 344 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 345 | golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= 346 | golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= 347 | golang.org/x/exp v0.0.0-20190731235908-ec7cb31e5a56/go.mod h1:JhuoJpWY28nO4Vef9tZUw9qufEGTyX1+7lmHxV5q5G4= 348 | golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= 349 | golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= 350 | golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 351 | golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 352 | golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= 353 | golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= 354 | golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= 355 | golang.org/x/exp v0.0.0-20221012211006-4de253d81b95 h1:sBdrWpxhGDdTAYNqbgBLAR+ULAPPhfgncLr1X0lyWtg= 356 | golang.org/x/exp v0.0.0-20221012211006-4de253d81b95/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE= 357 | golang.org/x/exp/shiny v0.0.0-20220827204233-334a2380cb91 h1:ryT6Nf0R83ZgD8WnFFdfI8wCeyqgdXWN4+CkFVNPAT0= 358 | golang.org/x/exp/shiny v0.0.0-20220827204233-334a2380cb91/go.mod h1:VjAR7z0ngyATZTELrBSkxOOHhhlnVUxDye4mcjx5h/8= 359 | golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= 360 | golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 361 | golang.org/x/image v0.0.0-20210504121937-7319ad40d33e/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= 362 | golang.org/x/image v0.0.0-20210628002857-a66eb6448b8d/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= 363 | golang.org/x/image v0.0.0-20211028202545-6944b10bf410/go.mod h1:023OzeP/+EPmXeapQh35lcL3II3LrY8Ic+EFFKVhULM= 364 | golang.org/x/image v0.0.0-20220601225756-64ec528b34cd/go.mod h1:doUCurBvlfPMKfmIpRIywoHmhN3VyhnoFDbvIEWF4hY= 365 | golang.org/x/image v0.1.0 h1:r8Oj8ZA2Xy12/b5KZYj3tuv7NG/fBz3TwQVvpJ9l8Rk= 366 | golang.org/x/image v0.1.0/go.mod h1:iyPr49SD/G/TBxYVB/9RRtGUT5eNbo2u4NamWeQcD5c= 367 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 368 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= 369 | golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= 370 | golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 371 | golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 372 | golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 373 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= 374 | golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= 375 | golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 376 | golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 377 | golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 378 | golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= 379 | golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= 380 | golang.org/x/mobile v0.0.0-20190415191353-3e0bab5405d6/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= 381 | golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= 382 | golang.org/x/mobile v0.0.0-20211207041440-4e6c2922fdee/go.mod h1:pe2sM7Uk+2Su1y7u/6Z8KJ24D7lepUjFZbhFOrmDfuQ= 383 | golang.org/x/mobile v0.0.0-20220722155234-aaac322e2105 h1:3vUV5x5+3LfQbgk7paCM6INOaJG9xXQbn79xoNkwfIk= 384 | golang.org/x/mobile v0.0.0-20220722155234-aaac322e2105/go.mod h1:pe2sM7Uk+2Su1y7u/6Z8KJ24D7lepUjFZbhFOrmDfuQ= 385 | golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= 386 | golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= 387 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 388 | golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= 389 | golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 390 | golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 391 | golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 392 | golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 393 | golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= 394 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= 395 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 396 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 397 | golang.org/x/net v0.0.0-20181023162649-9b4f9f5ad519/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 398 | golang.org/x/net v0.0.0-20181201002055-351d144fa1fc/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 399 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 400 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= 401 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 402 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 403 | golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 404 | golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= 405 | golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= 406 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 407 | golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 408 | golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 409 | golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 410 | golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 411 | golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 412 | golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 413 | golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 414 | golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= 415 | golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 416 | golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 417 | golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 418 | golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 419 | golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= 420 | golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 421 | golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 422 | golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= 423 | golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 424 | golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 425 | golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= 426 | golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 427 | golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 428 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= 429 | golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= 430 | golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= 431 | golang.org/x/net v0.0.0-20210510120150-4163338589ed/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 432 | golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 433 | golang.org/x/net v0.0.0-20211118161319-6a13c67c3ce4/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 434 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= 435 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= 436 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= 437 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 438 | golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 439 | golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 440 | golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= 441 | golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 442 | golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 443 | golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 444 | golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 445 | golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 446 | golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 447 | golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= 448 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 449 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 450 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 451 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 452 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 453 | golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 454 | golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 455 | golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 456 | golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 457 | golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 458 | golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 459 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= 460 | golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 461 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 462 | golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 463 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= 464 | golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 465 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 466 | golang.org/x/sys v0.0.0-20190429190828-d89cdac9e872/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 467 | golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 468 | golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 469 | golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 470 | golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 471 | golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 472 | golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 473 | golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 474 | golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 475 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 476 | golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 477 | golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 478 | golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 479 | golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 480 | golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 481 | golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 482 | golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 483 | golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 484 | golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 485 | golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 486 | golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 487 | golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 488 | golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 489 | golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 490 | golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 491 | golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 492 | golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 493 | golang.org/x/sys v0.0.0-20201022201747-fb209a7c41cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 494 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 495 | golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 496 | golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 497 | golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 498 | golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 499 | golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 500 | golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 501 | golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 502 | golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 503 | golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 504 | golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 505 | golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 506 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 507 | golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 508 | golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 509 | golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 510 | golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 511 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 512 | golang.org/x/sys v0.0.0-20220712014510-0a85c31ab51e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 513 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 514 | golang.org/x/sys v0.0.0-20220818161305-2296e01440c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 515 | golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64 h1:UiNENfZ8gDvpiWw7IpOMQ27spWmThO1RwwdQVbJahJM= 516 | golang.org/x/sys v0.0.0-20220825204002-c680a09ffe64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 517 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= 518 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= 519 | golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 520 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 521 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= 522 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 523 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 524 | golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 525 | golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 526 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= 527 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= 528 | golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= 529 | golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= 530 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 531 | golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 532 | golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= 533 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 534 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 535 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= 536 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 537 | golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 538 | golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 539 | golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= 540 | golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 541 | golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 542 | golang.org/x/tools v0.0.0-20190524140312-2c0ae7006135/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= 543 | golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 544 | golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 545 | golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= 546 | golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 547 | golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 548 | golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 549 | golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 550 | golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 551 | golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 552 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 553 | golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 554 | golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= 555 | golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 556 | golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 557 | golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 558 | golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 559 | golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 560 | golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 561 | golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 562 | golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 563 | golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 564 | golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= 565 | golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= 566 | golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= 567 | golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= 568 | golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 569 | golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 570 | golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 571 | golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 572 | golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= 573 | golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 574 | golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 575 | golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= 576 | golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= 577 | golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 578 | golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 579 | golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 580 | golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 581 | golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= 582 | golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= 583 | golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 584 | golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= 585 | golang.org/x/tools v0.1.8-0.20211022200916-316ba0b74098/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= 586 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= 587 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 588 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 589 | golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 590 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 591 | google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= 592 | google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= 593 | google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 594 | google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= 595 | google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 596 | google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 597 | google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= 598 | google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 599 | google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 600 | google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 601 | google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 602 | google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= 603 | google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= 604 | google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= 605 | google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= 606 | google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= 607 | google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= 608 | google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= 609 | google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= 610 | google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU= 611 | google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94= 612 | google.golang.org/api v0.44.0/go.mod h1:EBOGZqzyhtvMDoxwS97ctnh0zUmYY6CxqXsc1AvkYD8= 613 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= 614 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 615 | google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= 616 | google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= 617 | google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 618 | google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 619 | google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= 620 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= 621 | google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 622 | google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 623 | google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 624 | google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= 625 | google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 626 | google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= 627 | google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= 628 | google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 629 | google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 630 | google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 631 | google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 632 | google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 633 | google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= 634 | google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= 635 | google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 636 | google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 637 | google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 638 | google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 639 | google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 640 | google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 641 | google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 642 | google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 643 | google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= 644 | google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= 645 | google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= 646 | google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= 647 | google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 648 | google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 649 | google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 650 | google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 651 | google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 652 | google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 653 | google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 654 | google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 655 | google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 656 | google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 657 | google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 658 | google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= 659 | google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A= 660 | google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= 661 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= 662 | google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= 663 | google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= 664 | google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg= 665 | google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY= 666 | google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 667 | google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 668 | google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= 669 | google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= 670 | google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk= 671 | google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 672 | google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 673 | google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= 674 | google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= 675 | google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= 676 | google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= 677 | google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 678 | google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 679 | google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= 680 | google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= 681 | google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= 682 | google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= 683 | google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= 684 | google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= 685 | google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= 686 | google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 687 | google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 688 | google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= 689 | google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= 690 | google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= 691 | google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= 692 | google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 693 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 694 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 695 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= 696 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 697 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= 698 | gopkg.in/ini.v1 v1.62.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 699 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 700 | gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 701 | gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 702 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= 703 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 704 | gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 705 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= 706 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= 707 | honnef.co/go/js/dom v0.0.0-20210725211120-f030747120f2 h1:oomkgU6VaQDsV6qZby2uz1Lap0eXmku8+2em3A/l700= 708 | honnef.co/go/js/dom v0.0.0-20210725211120-f030747120f2/go.mod h1:sUMDUKNB2ZcVjt92UnLy3cdGs+wDAcrPdV3JP6sVgA4= 709 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 710 | honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 711 | honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 712 | honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= 713 | honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= 714 | honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= 715 | honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= 716 | rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= 717 | rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= 718 | rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= 719 | -------------------------------------------------------------------------------- /examples/minimum/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | package main 5 | 6 | import ( 7 | "log" 8 | 9 | "golang.design/x/hotkey" 10 | "golang.design/x/hotkey/mainthread" 11 | ) 12 | 13 | func main() { mainthread.Init(fn) } // Not necessary when use in Fyne, Ebiten or Gio. 14 | func fn() { 15 | hk := hotkey.New([]hotkey.Modifier{hotkey.ModCtrl, hotkey.ModShift}, hotkey.KeyS) 16 | err := hk.Register() 17 | if err != nil { 18 | log.Fatalf("hotkey: failed to register hotkey: %v", err) 19 | return 20 | } 21 | 22 | log.Printf("hotkey: %v is registered\n", hk) 23 | <-hk.Keydown() 24 | log.Printf("hotkey: %v is down\n", hk) 25 | <-hk.Keyup() 26 | log.Printf("hotkey: %v is up\n", hk) 27 | hk.Unregister() 28 | log.Printf("hotkey: %v is unregistered\n", hk) 29 | } 30 | -------------------------------------------------------------------------------- /examples/multiple/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | 5 | package main 6 | 7 | import ( 8 | "log" 9 | "sync" 10 | 11 | "golang.design/x/hotkey" 12 | "golang.design/x/hotkey/mainthread" 13 | ) 14 | 15 | func main() { mainthread.Init(fn) } 16 | func fn() { 17 | wg := sync.WaitGroup{} 18 | wg.Add(2) 19 | go func() { 20 | defer wg.Done() 21 | 22 | err := listenHotkey(hotkey.KeyS, hotkey.ModCtrl, hotkey.ModShift) 23 | if err != nil { 24 | log.Println(err) 25 | } 26 | }() 27 | go func() { 28 | defer wg.Done() 29 | 30 | err := listenHotkey(hotkey.KeyA, hotkey.ModCtrl, hotkey.ModShift) 31 | if err != nil { 32 | log.Println(err) 33 | } 34 | }() 35 | wg.Wait() 36 | } 37 | 38 | func listenHotkey(key hotkey.Key, mods ...hotkey.Modifier) (err error) { 39 | ms := []hotkey.Modifier{} 40 | ms = append(ms, mods...) 41 | hk := hotkey.New(ms, key) 42 | 43 | err = hk.Register() 44 | if err != nil { 45 | return 46 | } 47 | 48 | // Blocks until the hokey is triggered. 49 | <-hk.Keydown() 50 | log.Printf("hotkey: %v is down\n", hk) 51 | <-hk.Keyup() 52 | log.Printf("hotkey: %v is up\n", hk) 53 | hk.Unregister() 54 | return 55 | } 56 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module golang.design/x/hotkey 2 | 3 | go 1.17 4 | 5 | require golang.design/x/mainthread v0.3.0 6 | -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- 1 | golang.design/x/mainthread v0.3.0 h1:UwFus0lcPodNpMOGoQMe87jSFwbSsEY//CA7yVmu4j8= 2 | golang.design/x/mainthread v0.3.0/go.mod h1:vYX7cF2b3pTJMGM/hc13NmN6kblKnf4/IyvHeu259L0= 3 | golang.org/x/sys v0.0.0-20201022201747-fb209a7c41cd h1:WgqgiQvkiZWz7XLhphjt2GI2GcGCTIZs9jqXMWmH+oc= 4 | golang.org/x/sys v0.0.0-20201022201747-fb209a7c41cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 5 | -------------------------------------------------------------------------------- /hotkey.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | // Package hotkey provides the basic facility to register a system-level 8 | // global hotkey shortcut so that an application can be notified if a user 9 | // triggers the desired hotkey. A hotkey must be a combination of modifiers 10 | // and a single key. 11 | // 12 | // Note platform specific details: 13 | // 14 | // - On macOS, due to the OS restriction (other platforms does not have 15 | // this restriction), hotkey events must be handled on the "main thread". 16 | // Therefore, in order to use this package properly, one must start an 17 | // OS main event loop on the main thread, For self-contained applications, 18 | // using [mainthread] package. 19 | // is possible. It is uncessary or applications based on other GUI frameworks, 20 | // such as fyne, ebiten, or Gio. See the "[examples]" for more examples. 21 | // 22 | // - On Linux (X11), when AutoRepeat is enabled in the X server, the 23 | // Keyup is triggered automatically and continuously as Keydown continues. 24 | // 25 | // - On Linux (X11), some keys may be mapped to multiple Mod keys. To 26 | // correctly register the key combination, one must use the correct 27 | // underlying keycode combination. For example, a regular Ctrl+Alt+S 28 | // might be registered as: Ctrl+Mod2+Mod4+S. 29 | // 30 | // - If this package did not include a desired key, one can always provide 31 | // the keycode to the API. For example, if a key code is 0x15, then the 32 | // corresponding key is `hotkey.Key(0x15)`. 33 | // 34 | // THe following is a minimum example: 35 | // 36 | // package main 37 | // 38 | // import ( 39 | // "log" 40 | // 41 | // "golang.design/x/hotkey" 42 | // "golang.design/x/hotkey/mainthread" 43 | // ) 44 | // 45 | // func main() { mainthread.Init(fn) } // Not necessary when use in Fyne, Ebiten or Gio. 46 | // func fn() { 47 | // hk := hotkey.New([]hotkey.Modifier{hotkey.ModCtrl, hotkey.ModShift}, hotkey.KeyS) 48 | // err := hk.Register() 49 | // if err != nil { 50 | // log.Fatalf("hotkey: failed to register hotkey: %v", err) 51 | // } 52 | // 53 | // log.Printf("hotkey: %v is registered\n", hk) 54 | // <-hk.Keydown() 55 | // log.Printf("hotkey: %v is down\n", hk) 56 | // <-hk.Keyup() 57 | // log.Printf("hotkey: %v is up\n", hk) 58 | // hk.Unregister() 59 | // log.Printf("hotkey: %v is unregistered\n", hk) 60 | // } 61 | // 62 | // [mainthread]: https://pkg.go.dev/golang.design/x/hotkey/mainthread 63 | // [examples]: https://github.com/golang-design/hotkey/tree/main/examples 64 | package hotkey 65 | 66 | import ( 67 | "fmt" 68 | "runtime" 69 | ) 70 | 71 | // Event represents a hotkey event 72 | type Event struct{} 73 | 74 | // Hotkey is a combination of modifiers and key to trigger an event 75 | type Hotkey struct { 76 | platformHotkey 77 | 78 | mods []Modifier 79 | key Key 80 | 81 | keydownIn chan<- Event 82 | keydownOut <-chan Event 83 | keyupIn chan<- Event 84 | keyupOut <-chan Event 85 | } 86 | 87 | // New creates a new hotkey for the given modifiers and keycode. 88 | func New(mods []Modifier, key Key) *Hotkey { 89 | keydownIn, keydownOut := newEventChan() 90 | keyupIn, keyupOut := newEventChan() 91 | hk := &Hotkey{ 92 | mods: mods, 93 | key: key, 94 | keydownIn: keydownIn, 95 | keydownOut: keydownOut, 96 | keyupIn: keyupIn, 97 | keyupOut: keyupOut, 98 | } 99 | 100 | // Make sure the hotkey is unregistered when the created 101 | // hotkey is garbage collected. 102 | runtime.SetFinalizer(hk, func(x interface{}) { 103 | hk := x.(*Hotkey) 104 | hk.unregister() 105 | close(hk.keydownIn) 106 | close(hk.keyupIn) 107 | }) 108 | return hk 109 | } 110 | 111 | // Register registers a combination of hotkeys. If the hotkey has 112 | // registered. This function will invalidates the old registration 113 | // and overwrites its callback. 114 | func (hk *Hotkey) Register() error { return hk.register() } 115 | 116 | // Keydown returns a channel that receives a signal when the hotkey is triggered. 117 | func (hk *Hotkey) Keydown() <-chan Event { return hk.keydownOut } 118 | 119 | // Keyup returns a channel that receives a signal when the hotkey is released. 120 | func (hk *Hotkey) Keyup() <-chan Event { return hk.keyupOut } 121 | 122 | // Unregister unregisters the hotkey. 123 | func (hk *Hotkey) Unregister() error { 124 | err := hk.unregister() 125 | if err != nil { 126 | return err 127 | } 128 | 129 | // Reset a new event channel. 130 | close(hk.keydownIn) 131 | close(hk.keyupIn) 132 | hk.keydownIn, hk.keydownOut = newEventChan() 133 | hk.keyupIn, hk.keyupOut = newEventChan() 134 | return nil 135 | } 136 | 137 | // String returns a string representation of the hotkey. 138 | func (hk *Hotkey) String() string { 139 | s := fmt.Sprintf("%v", hk.key) 140 | for _, mod := range hk.mods { 141 | s += fmt.Sprintf("+%v", mod) 142 | } 143 | return s 144 | } 145 | 146 | // newEventChan returns a sender and a receiver of a buffered channel 147 | // with infinite capacity. 148 | func newEventChan() (chan<- Event, <-chan Event) { 149 | in, out := make(chan Event), make(chan Event) 150 | 151 | go func() { 152 | var q []Event 153 | 154 | for { 155 | e, ok := <-in 156 | if !ok { 157 | close(out) 158 | return 159 | } 160 | q = append(q, e) 161 | for len(q) > 0 { 162 | select { 163 | case out <- q[0]: 164 | q[0] = Event{} 165 | q = q[1:] 166 | case e, ok := <-in: 167 | if ok { 168 | q = append(q, e) 169 | break 170 | } 171 | for _, e := range q { 172 | out <- e 173 | } 174 | close(out) 175 | return 176 | } 177 | } 178 | } 179 | }() 180 | return in, out 181 | } 182 | -------------------------------------------------------------------------------- /hotkey_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | //go:build darwin 8 | 9 | package hotkey 10 | 11 | /* 12 | #cgo CFLAGS: -x objective-c 13 | #cgo LDFLAGS: -framework Cocoa -framework Carbon 14 | #include 15 | #import 16 | #import 17 | 18 | extern void keydownCallback(uintptr_t handle); 19 | extern void keyupCallback(uintptr_t handle); 20 | int registerHotKey(int mod, int key, uintptr_t handle, EventHotKeyRef* ref); 21 | int unregisterHotKey(EventHotKeyRef ref); 22 | */ 23 | import "C" 24 | import ( 25 | "errors" 26 | "runtime/cgo" 27 | "sync" 28 | ) 29 | 30 | // Hotkey is a combination of modifiers and key to trigger an event 31 | type platformHotkey struct { 32 | mu sync.Mutex 33 | registered bool 34 | hkref C.EventHotKeyRef 35 | } 36 | 37 | func (hk *Hotkey) register() error { 38 | hk.mu.Lock() 39 | defer hk.mu.Unlock() 40 | if hk.registered { 41 | return errors.New("hotkey already registered") 42 | } 43 | 44 | // Note: we use handle number as hotkey id in the C side. 45 | // A cgo handle could ran out of space, but since in hotkey purpose 46 | // we won't have that much number of hotkeys. So this should be fine. 47 | 48 | h := cgo.NewHandle(hk) 49 | var mod Modifier 50 | for _, m := range hk.mods { 51 | mod += m 52 | } 53 | 54 | ret := C.registerHotKey(C.int(mod), C.int(hk.key), C.uintptr_t(h), &hk.hkref) 55 | if ret == C.int(-1) { 56 | return errors.New("failed to register the hotkey") 57 | } 58 | 59 | hk.registered = true 60 | return nil 61 | } 62 | 63 | func (hk *Hotkey) unregister() error { 64 | hk.mu.Lock() 65 | defer hk.mu.Unlock() 66 | if !hk.registered { 67 | return errors.New("hotkey is not registered") 68 | } 69 | 70 | ret := C.unregisterHotKey(hk.hkref) 71 | if ret == C.int(-1) { 72 | return errors.New("failed to unregister the current hotkey") 73 | } 74 | hk.registered = false 75 | return nil 76 | } 77 | 78 | //export keydownCallback 79 | func keydownCallback(h uintptr) { 80 | hk := cgo.Handle(h).Value().(*Hotkey) 81 | hk.keydownIn <- Event{} 82 | } 83 | 84 | //export keyupCallback 85 | func keyupCallback(h uintptr) { 86 | hk := cgo.Handle(h).Value().(*Hotkey) 87 | hk.keyupIn <- Event{} 88 | } 89 | 90 | // Modifier represents a modifier. 91 | // See: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h 92 | type Modifier uint32 93 | 94 | // All kinds of Modifiers 95 | const ( 96 | ModCtrl Modifier = 0x1000 97 | ModShift Modifier = 0x200 98 | ModOption Modifier = 0x800 99 | ModCmd Modifier = 0x100 100 | ) 101 | 102 | // Key represents a key. 103 | // See: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/Headers/Events.h 104 | type Key uint8 105 | 106 | // All kinds of keys 107 | const ( 108 | KeySpace Key = 49 109 | Key1 Key = 18 110 | Key2 Key = 19 111 | Key3 Key = 20 112 | Key4 Key = 21 113 | Key5 Key = 23 114 | Key6 Key = 22 115 | Key7 Key = 26 116 | Key8 Key = 28 117 | Key9 Key = 25 118 | Key0 Key = 29 119 | KeyA Key = 0 120 | KeyB Key = 11 121 | KeyC Key = 8 122 | KeyD Key = 2 123 | KeyE Key = 14 124 | KeyF Key = 3 125 | KeyG Key = 5 126 | KeyH Key = 4 127 | KeyI Key = 34 128 | KeyJ Key = 38 129 | KeyK Key = 40 130 | KeyL Key = 37 131 | KeyM Key = 46 132 | KeyN Key = 45 133 | KeyO Key = 31 134 | KeyP Key = 35 135 | KeyQ Key = 12 136 | KeyR Key = 15 137 | KeyS Key = 1 138 | KeyT Key = 17 139 | KeyU Key = 32 140 | KeyV Key = 9 141 | KeyW Key = 13 142 | KeyX Key = 7 143 | KeyY Key = 16 144 | KeyZ Key = 6 145 | 146 | KeyReturn Key = 0x24 147 | KeyEscape Key = 0x35 148 | KeyDelete Key = 0x33 149 | KeyTab Key = 0x30 150 | 151 | KeyLeft Key = 0x7B 152 | KeyRight Key = 0x7C 153 | KeyUp Key = 0x7E 154 | KeyDown Key = 0x7D 155 | 156 | KeyF1 Key = 0x7A 157 | KeyF2 Key = 0x78 158 | KeyF3 Key = 0x63 159 | KeyF4 Key = 0x76 160 | KeyF5 Key = 0x60 161 | KeyF6 Key = 0x61 162 | KeyF7 Key = 0x62 163 | KeyF8 Key = 0x64 164 | KeyF9 Key = 0x65 165 | KeyF10 Key = 0x6D 166 | KeyF11 Key = 0x67 167 | KeyF12 Key = 0x6F 168 | KeyF13 Key = 0x69 169 | KeyF14 Key = 0x6B 170 | KeyF15 Key = 0x71 171 | KeyF16 Key = 0x6A 172 | KeyF17 Key = 0x40 173 | KeyF18 Key = 0x4F 174 | KeyF19 Key = 0x50 175 | KeyF20 Key = 0x5A 176 | ) 177 | -------------------------------------------------------------------------------- /hotkey_darwin.m: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | //go:build darwin 8 | 9 | #include 10 | #import 11 | #import 12 | extern void keydownCallback(uintptr_t handle); 13 | extern void keyupCallback(uintptr_t handle); 14 | 15 | static OSStatus 16 | keydownHandler(EventHandlerCallRef nextHandler, EventRef theEvent, void *userData) { 17 | EventHotKeyID k; 18 | GetEventParameter(theEvent, kEventParamDirectObject, typeEventHotKeyID, NULL, sizeof(k), NULL, &k); 19 | keydownCallback((uintptr_t)k.id); // use id as handle 20 | return noErr; 21 | } 22 | 23 | static OSStatus 24 | keyupHandler(EventHandlerCallRef nextHandler, EventRef theEvent, void *userData) { 25 | EventHotKeyID k; 26 | GetEventParameter(theEvent, kEventParamDirectObject, typeEventHotKeyID, NULL, sizeof(k), NULL, &k); 27 | keyupCallback((uintptr_t)k.id); // use id as handle 28 | return noErr; 29 | } 30 | 31 | // registerHotkeyWithCallback registers a global system hotkey for callbacks. 32 | int registerHotKey(int mod, int key, uintptr_t handle, EventHotKeyRef* ref) { 33 | __block OSStatus s; 34 | dispatch_sync(dispatch_get_main_queue(), ^{ 35 | EventTypeSpec keydownEvent; 36 | keydownEvent.eventClass = kEventClassKeyboard; 37 | keydownEvent.eventKind = kEventHotKeyPressed; 38 | EventTypeSpec keyupEvent; 39 | keyupEvent.eventClass = kEventClassKeyboard; 40 | keyupEvent.eventKind = kEventHotKeyReleased; 41 | InstallApplicationEventHandler( 42 | &keydownHandler, 1, &keydownEvent, NULL, NULL 43 | ); 44 | InstallApplicationEventHandler( 45 | &keyupHandler, 1, &keyupEvent, NULL, NULL 46 | ); 47 | 48 | EventHotKeyID hkid = {.id = handle}; 49 | s = RegisterEventHotKey( 50 | key, mod, hkid, GetApplicationEventTarget(), 0, ref 51 | ); 52 | }); 53 | if (s != noErr) { 54 | return -1; 55 | } 56 | return 0; 57 | } 58 | 59 | int unregisterHotKey(EventHotKeyRef ref) { 60 | OSStatus s = UnregisterEventHotKey(ref); 61 | if (s != noErr) { 62 | return -1; 63 | } 64 | return 0; 65 | } 66 | -------------------------------------------------------------------------------- /hotkey_darwin_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | //go:build darwin && cgo 8 | 9 | package hotkey_test 10 | 11 | import ( 12 | "context" 13 | "fmt" 14 | "testing" 15 | "time" 16 | 17 | "golang.design/x/hotkey" 18 | ) 19 | 20 | // TestHotkey should always run success. 21 | // This is a test to run and for manually testing the registration of multiple 22 | // hotkeys. Registered hotkeys: 23 | // Ctrl+Shift+S 24 | // Ctrl+Option+S 25 | func TestHotkey(t *testing.T) { 26 | tt := time.Second * 5 27 | done := make(chan struct{}, 2) 28 | ctx, cancel := context.WithTimeout(context.Background(), tt) 29 | go func() { 30 | hk := hotkey.New([]hotkey.Modifier{hotkey.ModCtrl, hotkey.ModShift}, hotkey.KeyS) 31 | if err := hk.Register(); err != nil { 32 | t.Errorf("failed to register hotkey: %v", err) 33 | return 34 | } 35 | for { 36 | select { 37 | case <-ctx.Done(): 38 | cancel() 39 | done <- struct{}{} 40 | return 41 | case <-hk.Keydown(): 42 | fmt.Println("triggered ctrl+shift+s") 43 | } 44 | } 45 | }() 46 | 47 | go func() { 48 | hk := hotkey.New([]hotkey.Modifier{hotkey.ModCtrl, hotkey.ModOption}, hotkey.KeyS) 49 | if err := hk.Register(); err != nil { 50 | t.Errorf("failed to register hotkey: %v", err) 51 | return 52 | } 53 | 54 | for { 55 | select { 56 | case <-ctx.Done(): 57 | cancel() 58 | done <- struct{}{} 59 | return 60 | case <-hk.Keydown(): 61 | fmt.Println("triggered ctrl+option+s") 62 | } 63 | } 64 | }() 65 | 66 | <-done 67 | <-done 68 | } 69 | -------------------------------------------------------------------------------- /hotkey_linux.c: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | //go:build linux 8 | 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | extern void hotkeyDown(uintptr_t hkhandle); 15 | extern void hotkeyUp(uintptr_t hkhandle); 16 | 17 | int displayTest() { 18 | Display* d = NULL; 19 | for (int i = 0; i < 42; i++) { 20 | d = XOpenDisplay(0); 21 | if (d == NULL) continue; 22 | break; 23 | } 24 | if (d == NULL) { 25 | return -1; 26 | } 27 | return 0; 28 | } 29 | 30 | // FIXME: handle bad access properly. 31 | // int handleErrors( Display* dpy, XErrorEvent* pErr ) 32 | // { 33 | // printf("X Error Handler called, values: %d/%lu/%d/%d/%d\n", 34 | // pErr->type, 35 | // pErr->serial, 36 | // pErr->error_code, 37 | // pErr->request_code, 38 | // pErr->minor_code ); 39 | // if( pErr->request_code == 33 ){ // 33 (X_GrabKey) 40 | // if( pErr->error_code == BadAccess ){ 41 | // printf("ERROR: key combination already grabbed by another client.\n"); 42 | // return 0; 43 | // } 44 | // } 45 | // return 0; 46 | // } 47 | 48 | // waitHotkey blocks until the hotkey is triggered. 49 | // this function crashes the program if the hotkey already grabbed by others. 50 | int waitHotkey(uintptr_t hkhandle, unsigned int mod, int key) { 51 | Display* d = NULL; 52 | for (int i = 0; i < 42; i++) { 53 | d = XOpenDisplay(0); 54 | if (d == NULL) continue; 55 | break; 56 | } 57 | if (d == NULL) { 58 | return -1; 59 | } 60 | int keycode = XKeysymToKeycode(d, key); 61 | XGrabKey(d, keycode, mod, DefaultRootWindow(d), False, GrabModeAsync, GrabModeAsync); 62 | XSelectInput(d, DefaultRootWindow(d), KeyPressMask); 63 | XEvent ev; 64 | while(1) { 65 | XNextEvent(d, &ev); 66 | switch(ev.type) { 67 | case KeyPress: 68 | hotkeyDown(hkhandle); 69 | continue; 70 | case KeyRelease: 71 | hotkeyUp(hkhandle); 72 | XUngrabKey(d, keycode, mod, DefaultRootWindow(d)); 73 | XCloseDisplay(d); 74 | return 0; 75 | } 76 | } 77 | } -------------------------------------------------------------------------------- /hotkey_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | //go:build linux 8 | 9 | package hotkey 10 | 11 | /* 12 | #cgo LDFLAGS: -lX11 13 | 14 | #include 15 | 16 | int displayTest(); 17 | int waitHotkey(uintptr_t hkhandle, unsigned int mod, int key); 18 | */ 19 | import "C" 20 | import ( 21 | "context" 22 | "errors" 23 | "runtime" 24 | "runtime/cgo" 25 | "sync" 26 | ) 27 | 28 | const errmsg = `Failed to initialize the X11 display, and the clipboard package 29 | will not work properly. Install the following dependency may help: 30 | 31 | apt install -y libx11-dev 32 | If the clipboard package is in an environment without a frame buffer, 33 | such as a cloud server, it may also be necessary to install xvfb: 34 | apt install -y xvfb 35 | and initialize a virtual frame buffer: 36 | Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & 37 | export DISPLAY=:99.0 38 | Then this package should be ready to use. 39 | ` 40 | 41 | func init() { 42 | if C.displayTest() != 0 { 43 | panic(errmsg) 44 | } 45 | } 46 | 47 | type platformHotkey struct { 48 | mu sync.Mutex 49 | registered bool 50 | ctx context.Context 51 | cancel context.CancelFunc 52 | canceled chan struct{} 53 | } 54 | 55 | // Nothing needs to do for register 56 | func (hk *Hotkey) register() error { 57 | hk.mu.Lock() 58 | if hk.registered { 59 | hk.mu.Unlock() 60 | return errors.New("hotkey already registered.") 61 | } 62 | hk.registered = true 63 | hk.ctx, hk.cancel = context.WithCancel(context.Background()) 64 | hk.canceled = make(chan struct{}) 65 | hk.mu.Unlock() 66 | 67 | go hk.handle() 68 | return nil 69 | } 70 | 71 | // Nothing needs to do for unregister 72 | func (hk *Hotkey) unregister() error { 73 | hk.mu.Lock() 74 | defer hk.mu.Unlock() 75 | if !hk.registered { 76 | return errors.New("hotkey is not registered.") 77 | } 78 | hk.cancel() 79 | hk.registered = false 80 | <-hk.canceled 81 | return nil 82 | } 83 | 84 | // handle registers an application global hotkey to the system, 85 | // and returns a channel that will signal if the hotkey is triggered. 86 | func (hk *Hotkey) handle() { 87 | runtime.LockOSThread() 88 | defer runtime.UnlockOSThread() 89 | // KNOWN ISSUE: if a hotkey is grabbed by others, C side will crash the program 90 | 91 | var mod Modifier 92 | for _, m := range hk.mods { 93 | mod = mod | m 94 | } 95 | h := cgo.NewHandle(hk) 96 | defer h.Delete() 97 | 98 | for { 99 | select { 100 | case <-hk.ctx.Done(): 101 | close(hk.canceled) 102 | return 103 | default: 104 | _ = C.waitHotkey(C.uintptr_t(h), C.uint(mod), C.int(hk.key)) 105 | } 106 | } 107 | } 108 | 109 | //export hotkeyDown 110 | func hotkeyDown(h uintptr) { 111 | hk := cgo.Handle(h).Value().(*Hotkey) 112 | hk.keydownIn <- Event{} 113 | } 114 | 115 | //export hotkeyUp 116 | func hotkeyUp(h uintptr) { 117 | hk := cgo.Handle(h).Value().(*Hotkey) 118 | hk.keyupIn <- Event{} 119 | } 120 | 121 | // Modifier represents a modifier. 122 | type Modifier uint32 123 | 124 | // All kinds of Modifiers 125 | // See /usr/include/X11/X.h 126 | const ( 127 | ModCtrl Modifier = (1 << 2) 128 | ModShift Modifier = (1 << 0) 129 | Mod1 Modifier = (1 << 3) 130 | Mod2 Modifier = (1 << 4) 131 | Mod3 Modifier = (1 << 5) 132 | Mod4 Modifier = (1 << 6) 133 | Mod5 Modifier = (1 << 7) 134 | ) 135 | 136 | // Key represents a key. 137 | // See /usr/include/X11/keysymdef.h 138 | type Key uint16 139 | 140 | // All kinds of keys 141 | const ( 142 | KeySpace Key = 0x0020 143 | Key1 Key = 0x0030 144 | Key2 Key = 0x0031 145 | Key3 Key = 0x0032 146 | Key4 Key = 0x0033 147 | Key5 Key = 0x0034 148 | Key6 Key = 0x0035 149 | Key7 Key = 0x0036 150 | Key8 Key = 0x0037 151 | Key9 Key = 0x0038 152 | Key0 Key = 0x0039 153 | KeyA Key = 0x0061 154 | KeyB Key = 0x0062 155 | KeyC Key = 0x0063 156 | KeyD Key = 0x0064 157 | KeyE Key = 0x0065 158 | KeyF Key = 0x0066 159 | KeyG Key = 0x0067 160 | KeyH Key = 0x0068 161 | KeyI Key = 0x0069 162 | KeyJ Key = 0x006a 163 | KeyK Key = 0x006b 164 | KeyL Key = 0x006c 165 | KeyM Key = 0x006d 166 | KeyN Key = 0x006e 167 | KeyO Key = 0x006f 168 | KeyP Key = 0x0070 169 | KeyQ Key = 0x0071 170 | KeyR Key = 0x0072 171 | KeyS Key = 0x0073 172 | KeyT Key = 0x0074 173 | KeyU Key = 0x0075 174 | KeyV Key = 0x0076 175 | KeyW Key = 0x0077 176 | KeyX Key = 0x0078 177 | KeyY Key = 0x0079 178 | KeyZ Key = 0x007a 179 | 180 | KeyReturn Key = 0xff0d 181 | KeyEscape Key = 0xff1b 182 | KeyDelete Key = 0xffff 183 | KeyTab Key = 0xff1b 184 | 185 | KeyLeft Key = 0xff51 186 | KeyRight Key = 0xff53 187 | KeyUp Key = 0xff52 188 | KeyDown Key = 0xff54 189 | 190 | KeyF1 Key = 0xffbe 191 | KeyF2 Key = 0xffbf 192 | KeyF3 Key = 0xffc0 193 | KeyF4 Key = 0xffc1 194 | KeyF5 Key = 0xffc2 195 | KeyF6 Key = 0xffc3 196 | KeyF7 Key = 0xffc4 197 | KeyF8 Key = 0xffc5 198 | KeyF9 Key = 0xffc6 199 | KeyF10 Key = 0xffc7 200 | KeyF11 Key = 0xffc8 201 | KeyF12 Key = 0xffc9 202 | KeyF13 Key = 0xffca 203 | KeyF14 Key = 0xffcb 204 | KeyF15 Key = 0xffcc 205 | KeyF16 Key = 0xffcd 206 | KeyF17 Key = 0xffce 207 | KeyF18 Key = 0xffcf 208 | KeyF19 Key = 0xffd0 209 | KeyF20 Key = 0xffd1 210 | ) 211 | -------------------------------------------------------------------------------- /hotkey_linux_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | //go:build linux && cgo 8 | 9 | package hotkey_test 10 | 11 | import ( 12 | "context" 13 | "fmt" 14 | "testing" 15 | "time" 16 | 17 | "golang.design/x/hotkey" 18 | ) 19 | 20 | // TestHotkey should always run success. 21 | // This is a test to run and for manually testing, registered combination: 22 | // Ctrl+Alt+A (Ctrl+Mod2+Mod4+A on Linux) 23 | func TestHotkey(t *testing.T) { 24 | ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) 25 | defer cancel() 26 | 27 | hk := hotkey.New([]hotkey.Modifier{ 28 | hotkey.ModCtrl, hotkey.Mod2, hotkey.Mod4}, hotkey.KeyA) 29 | if err := hk.Register(); err != nil { 30 | t.Errorf("failed to register hotkey: %v", err) 31 | return 32 | } 33 | for { 34 | select { 35 | case <-ctx.Done(): 36 | return 37 | case <-hk.Keydown(): 38 | fmt.Println("triggered") 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /hotkey_nocgo.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | //go:build !windows && !cgo 8 | 9 | package hotkey 10 | 11 | type platformHotkey struct{} 12 | 13 | // Modifier represents a modifier 14 | type Modifier uint32 15 | 16 | // Key represents a key. 17 | type Key uint8 18 | 19 | func (hk *Hotkey) register() error { 20 | panic("hotkey: cannot use when CGO_ENABLED=0") 21 | } 22 | 23 | // unregister deregisteres a system hotkey. 24 | func (hk *Hotkey) unregister() error { 25 | panic("hotkey: cannot use when CGO_ENABLED=0") 26 | } 27 | -------------------------------------------------------------------------------- /hotkey_nocgo_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | //go:build (linux || darwin) && !cgo 8 | 9 | package hotkey_test 10 | 11 | import ( 12 | "testing" 13 | 14 | "golang.design/x/hotkey" 15 | ) 16 | 17 | // TestHotkey should always run success. 18 | // This is a test to run and for manually testing, registered combination: 19 | // Ctrl+Alt+A (Ctrl+Mod2+Mod4+A on Linux) 20 | func TestHotkey(t *testing.T) { 21 | defer func() { 22 | if r := recover(); r != nil { 23 | return 24 | } 25 | t.Fatalf("expect to fail when CGO_ENABLED=0") 26 | }() 27 | 28 | hk := hotkey.New([]hotkey.Modifier{}, hotkey.Key(0)) 29 | err := hk.Register() 30 | if err != nil { 31 | t.Fatal(err) 32 | } 33 | hk.Unregister() 34 | } 35 | -------------------------------------------------------------------------------- /hotkey_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | package hotkey_test 8 | 9 | import ( 10 | "os" 11 | "testing" 12 | 13 | "golang.design/x/hotkey/mainthread" 14 | ) 15 | 16 | // The test cannot be run twice since the mainthread loop may not be terminated: 17 | // go test -v -count=1 18 | func TestMain(m *testing.M) { 19 | mainthread.Init(func() { os.Exit(m.Run()) }) 20 | } 21 | -------------------------------------------------------------------------------- /hotkey_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | //go:build windows 8 | 9 | package hotkey 10 | 11 | import ( 12 | "errors" 13 | "runtime" 14 | "sync" 15 | "sync/atomic" 16 | "time" 17 | 18 | "golang.design/x/hotkey/internal/win" 19 | ) 20 | 21 | type platformHotkey struct { 22 | mu sync.Mutex 23 | hotkeyId uint64 24 | registered bool 25 | funcs chan func() 26 | canceled chan struct{} 27 | } 28 | 29 | var hotkeyId uint64 // atomic 30 | 31 | // register registers a system hotkey. It returns an error if 32 | // the registration is failed. This could be that the hotkey is 33 | // conflict with other hotkeys. 34 | func (hk *Hotkey) register() error { 35 | hk.mu.Lock() 36 | if hk.registered { 37 | hk.mu.Unlock() 38 | return errors.New("hotkey already registered") 39 | } 40 | 41 | mod := uint8(0) 42 | for _, m := range hk.mods { 43 | mod = mod | uint8(m) 44 | } 45 | 46 | hk.hotkeyId = atomic.AddUint64(&hotkeyId, 1) 47 | hk.funcs = make(chan func()) 48 | hk.canceled = make(chan struct{}) 49 | go hk.handle() 50 | 51 | var ( 52 | ok bool 53 | err error 54 | done = make(chan struct{}) 55 | ) 56 | hk.funcs <- func() { 57 | ok, err = win.RegisterHotKey(0, uintptr(hk.hotkeyId), uintptr(mod), uintptr(hk.key)) 58 | done <- struct{}{} 59 | } 60 | <-done 61 | if !ok { 62 | close(hk.canceled) 63 | hk.mu.Unlock() 64 | return err 65 | } 66 | hk.registered = true 67 | hk.mu.Unlock() 68 | return nil 69 | } 70 | 71 | // unregister deregisteres a system hotkey. 72 | func (hk *Hotkey) unregister() error { 73 | hk.mu.Lock() 74 | defer hk.mu.Unlock() 75 | if !hk.registered { 76 | return errors.New("hotkey is not registered") 77 | } 78 | 79 | done := make(chan struct{}) 80 | hk.funcs <- func() { 81 | win.UnregisterHotKey(0, uintptr(hk.hotkeyId)) 82 | done <- struct{}{} 83 | close(hk.canceled) 84 | } 85 | <-done 86 | 87 | <-hk.canceled 88 | hk.registered = false 89 | return nil 90 | } 91 | 92 | const ( 93 | // wmHotkey represents hotkey message 94 | wmHotkey uint32 = 0x0312 95 | wmQuit uint32 = 0x0012 96 | ) 97 | 98 | // handle handles the hotkey event loop. 99 | func (hk *Hotkey) handle() { 100 | // We could optimize this. So far each hotkey is served in an 101 | // individual thread. If we have too many hotkeys, then a program 102 | // have to create too many threads to serve them. 103 | runtime.LockOSThread() 104 | defer runtime.UnlockOSThread() 105 | 106 | isKeyDown := false 107 | tk := time.NewTicker(time.Second / 100) 108 | for range tk.C { 109 | msg := win.MSG{} 110 | if !win.PeekMessage(&msg, 0, 0, 0) { 111 | select { 112 | case f := <-hk.funcs: 113 | f() 114 | case <-hk.canceled: 115 | return 116 | default: 117 | // If the latest status is KeyDown, and AsyncKeyState is 0, consider key is up. 118 | if win.GetAsyncKeyState(int(hk.key)) == 0 && isKeyDown { 119 | hk.keyupIn <- Event{} 120 | isKeyDown = false 121 | } 122 | } 123 | continue 124 | } 125 | if !win.GetMessage(&msg, 0, 0, 0) { 126 | return 127 | } 128 | 129 | switch msg.Message { 130 | case wmHotkey: 131 | hk.keydownIn <- Event{} 132 | isKeyDown = true 133 | case wmQuit: 134 | return 135 | } 136 | } 137 | } 138 | 139 | // Modifier represents a modifier. 140 | // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerhotkey 141 | type Modifier uint8 142 | 143 | // All kinds of Modifiers 144 | const ( 145 | ModAlt Modifier = 0x1 146 | ModCtrl Modifier = 0x2 147 | ModShift Modifier = 0x4 148 | ModWin Modifier = 0x8 149 | ) 150 | 151 | // Key represents a key. 152 | // https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes 153 | type Key uint16 154 | 155 | // All kinds of Keys 156 | const ( 157 | KeySpace Key = 0x20 158 | Key0 Key = 0x30 159 | Key1 Key = 0x31 160 | Key2 Key = 0x32 161 | Key3 Key = 0x33 162 | Key4 Key = 0x34 163 | Key5 Key = 0x35 164 | Key6 Key = 0x36 165 | Key7 Key = 0x37 166 | Key8 Key = 0x38 167 | Key9 Key = 0x39 168 | KeyA Key = 0x41 169 | KeyB Key = 0x42 170 | KeyC Key = 0x43 171 | KeyD Key = 0x44 172 | KeyE Key = 0x45 173 | KeyF Key = 0x46 174 | KeyG Key = 0x47 175 | KeyH Key = 0x48 176 | KeyI Key = 0x49 177 | KeyJ Key = 0x4A 178 | KeyK Key = 0x4B 179 | KeyL Key = 0x4C 180 | KeyM Key = 0x4D 181 | KeyN Key = 0x4E 182 | KeyO Key = 0x4F 183 | KeyP Key = 0x50 184 | KeyQ Key = 0x51 185 | KeyR Key = 0x52 186 | KeyS Key = 0x53 187 | KeyT Key = 0x54 188 | KeyU Key = 0x55 189 | KeyV Key = 0x56 190 | KeyW Key = 0x57 191 | KeyX Key = 0x58 192 | KeyY Key = 0x59 193 | KeyZ Key = 0x5A 194 | 195 | KeyReturn Key = 0x0D 196 | KeyEscape Key = 0x1B 197 | KeyDelete Key = 0x2E 198 | KeyTab Key = 0x09 199 | 200 | KeyLeft Key = 0x25 201 | KeyRight Key = 0x27 202 | KeyUp Key = 0x26 203 | KeyDown Key = 0x28 204 | 205 | KeyF1 Key = 0x70 206 | KeyF2 Key = 0x71 207 | KeyF3 Key = 0x72 208 | KeyF4 Key = 0x73 209 | KeyF5 Key = 0x74 210 | KeyF6 Key = 0x75 211 | KeyF7 Key = 0x76 212 | KeyF8 Key = 0x77 213 | KeyF9 Key = 0x78 214 | KeyF10 Key = 0x79 215 | KeyF11 Key = 0x7A 216 | KeyF12 Key = 0x7B 217 | KeyF13 Key = 0x7C 218 | KeyF14 Key = 0x7D 219 | KeyF15 Key = 0x7E 220 | KeyF16 Key = 0x7F 221 | KeyF17 Key = 0x80 222 | KeyF18 Key = 0x81 223 | KeyF19 Key = 0x82 224 | KeyF20 Key = 0x83 225 | ) 226 | -------------------------------------------------------------------------------- /hotkey_windows_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | //go:build windows 8 | 9 | package hotkey_test 10 | 11 | import ( 12 | "context" 13 | "fmt" 14 | "testing" 15 | "time" 16 | 17 | "golang.design/x/hotkey" 18 | ) 19 | 20 | // TestHotkey should always run success. 21 | // This is a test to run and for manually testing, registered combination: 22 | // Ctrl+Shift+S 23 | func TestHotkey(t *testing.T) { 24 | tt := time.Second * 5 25 | 26 | ctx, cancel := context.WithTimeout(context.Background(), tt) 27 | defer cancel() 28 | 29 | hk := hotkey.New([]hotkey.Modifier{hotkey.ModCtrl, hotkey.ModShift}, hotkey.KeyS) 30 | if err := hk.Register(); err != nil { 31 | t.Errorf("failed to register hotkey: %v", err) 32 | return 33 | } 34 | for { 35 | select { 36 | case <-ctx.Done(): 37 | return 38 | case <-hk.Keydown(): 39 | fmt.Println("triggered") 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /internal/win/hotkey.go: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | //go:build windows 8 | // +build windows 9 | 10 | package win 11 | 12 | import ( 13 | "syscall" 14 | "unsafe" 15 | ) 16 | 17 | var ( 18 | user32 = syscall.NewLazyDLL("user32") 19 | registerHotkey = user32.NewProc("RegisterHotKey") 20 | unregisterHotkey = user32.NewProc("UnregisterHotKey") 21 | getMessage = user32.NewProc("GetMessageW") 22 | peekMessage = user32.NewProc("PeekMessageA") 23 | sendMessage = user32.NewProc("SendMessageW") 24 | getAsyncKeyState = user32.NewProc("GetAsyncKeyState") 25 | quitMessage = user32.NewProc("PostQuitMessage") 26 | ) 27 | 28 | // RegisterHotKey defines a system-wide hot key. 29 | // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-registerhotkey 30 | func RegisterHotKey(hwnd, id uintptr, mod uintptr, k uintptr) (bool, error) { 31 | ret, _, err := registerHotkey.Call( 32 | hwnd, id, mod, k, 33 | ) 34 | return ret != 0, err 35 | } 36 | 37 | // UnregisterHotKey frees a hot key previously registered by the calling 38 | // thread. 39 | // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-unregisterhotkey 40 | func UnregisterHotKey(hwnd, id uintptr) (bool, error) { 41 | ret, _, err := unregisterHotkey.Call(hwnd, id) 42 | return ret != 0, err 43 | } 44 | 45 | // MSG contains message information from a thread's message queue. 46 | // 47 | // https://docs.microsoft.com/en-us/windows/win32/api/winuser/ns-winuser-msg 48 | type MSG struct { 49 | HWnd uintptr 50 | Message uint32 51 | WParam uintptr 52 | LParam uintptr 53 | Time uint32 54 | Pt struct { //POINT 55 | x, y int32 56 | } 57 | } 58 | 59 | // SendMessage sends the specified message to a window or windows. 60 | // The SendMessage function calls the window procedure for the specified 61 | // window and does not return until the window procedure has processed 62 | // the message. 63 | // The return value specifies the result of the message processing; 64 | // it depends on the message sent. 65 | // 66 | // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-sendmessage 67 | func SendMessage(hwnd uintptr, msg uint32, wParam, lParam uintptr) uintptr { 68 | ret, _, _ := sendMessage.Call( 69 | hwnd, 70 | uintptr(msg), 71 | wParam, 72 | lParam, 73 | ) 74 | 75 | return ret 76 | } 77 | 78 | // GetMessage retrieves a message from the calling thread's message 79 | // queue. The function dispatches incoming sent messages until a posted 80 | // message is available for retrieval. 81 | // 82 | // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmessage 83 | func GetMessage(msg *MSG, hWnd uintptr, msgFilterMin, msgFilterMax uint32) bool { 84 | ret, _, _ := getMessage.Call( 85 | uintptr(unsafe.Pointer(msg)), 86 | hWnd, 87 | uintptr(msgFilterMin), 88 | uintptr(msgFilterMax), 89 | ) 90 | 91 | return ret != 0 92 | } 93 | 94 | // PeekMessage dispatches incoming sent messages, checks the thread message 95 | // queue for a posted message, and retrieves the message (if any exist). 96 | // 97 | // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-peekmessagea 98 | func PeekMessage(msg *MSG, hWnd uintptr, msgFilterMin, msgFilterMax uint32) bool { 99 | ret, _, _ := peekMessage.Call( 100 | uintptr(unsafe.Pointer(msg)), 101 | hWnd, 102 | uintptr(msgFilterMin), 103 | uintptr(msgFilterMax), 104 | 0, // PM_NOREMOVE 105 | ) 106 | 107 | return ret != 0 108 | } 109 | 110 | // PostQuitMessage indicates to the system that a thread has made 111 | // a request to terminate (quit). It is typically used in response 112 | // to a WM_DESTROY message. 113 | // 114 | // https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-postquitmessage 115 | func PostQuitMessage(exitCode int) { 116 | quitMessage.Call(uintptr(exitCode)) 117 | } 118 | 119 | func GetAsyncKeyState(keycode int) uintptr { 120 | ret, _, _ := getAsyncKeyState.Call(uintptr(keycode)) 121 | return ret 122 | } 123 | -------------------------------------------------------------------------------- /mainthread/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | // Package mainthread wrapps the golang.design/x/mainthread, and 8 | // provides a different implementation for macOS so that it can 9 | // handle main thread events for the NSApplication. 10 | package mainthread 11 | -------------------------------------------------------------------------------- /mainthread/os.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | //go:build windows || linux || (darwin && !cgo) 8 | 9 | package mainthread 10 | 11 | import "golang.design/x/mainthread" 12 | 13 | // Call calls f on the main thread and blocks until f finishes. 14 | func Call(f func()) { mainthread.Call(f) } 15 | 16 | // Init initializes the functionality of running arbitrary subsequent functions be called on the main system thread. 17 | // 18 | // Init must be called in the main.main function. 19 | func Init(main func()) { mainthread.Init(main) } 20 | -------------------------------------------------------------------------------- /mainthread/os_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | //go:build darwin 8 | 9 | package mainthread 10 | 11 | /* 12 | #cgo CFLAGS: -x objective-c 13 | #cgo LDFLAGS: -framework Cocoa 14 | #import 15 | #import 16 | 17 | extern void os_main(void); 18 | extern void wakeupMainThread(void); 19 | static bool isMainThread() { 20 | return [NSThread isMainThread]; 21 | } 22 | */ 23 | import "C" 24 | import ( 25 | "os" 26 | "runtime" 27 | ) 28 | 29 | func init() { 30 | runtime.LockOSThread() 31 | } 32 | 33 | // Call calls f on the main thread and blocks until f finishes. 34 | func Call(f func()) { 35 | if C.isMainThread() { 36 | f() 37 | return 38 | } 39 | go func() { 40 | mainFuncs <- f 41 | C.wakeupMainThread() 42 | }() 43 | } 44 | 45 | // Init initializes the functionality of running arbitrary subsequent functions be called on the main system thread. 46 | // 47 | // Init must be called in the main.main function. 48 | func Init(f func()) { 49 | go func() { 50 | f() 51 | os.Exit(0) 52 | }() 53 | 54 | C.os_main() 55 | } 56 | 57 | var mainFuncs = make(chan func(), 1) 58 | 59 | //export dispatchMainFuncs 60 | func dispatchMainFuncs() { 61 | for { 62 | select { 63 | case f := <-mainFuncs: 64 | f() 65 | default: 66 | return 67 | } 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /mainthread/os_darwin.m: -------------------------------------------------------------------------------- 1 | // Copyright 2022 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | //go:build darwin 8 | 9 | #include 10 | #import 11 | 12 | extern void dispatchMainFuncs(); 13 | 14 | void wakeupMainThread(void) { 15 | dispatch_async(dispatch_get_main_queue(), ^{ 16 | dispatchMainFuncs(); 17 | }); 18 | } 19 | 20 | // The following three lines of code must run on the main thread. 21 | // It must handle it using golang.design/x/mainthread. 22 | // 23 | // inspired from here: https://github.com/cehoffman/dotfiles/blob/4be8e893517e970d40746a9bdc67fe5832dd1c33/os/mac/iTerm2HotKey.m 24 | void os_main(void) { 25 | [NSApplication sharedApplication]; 26 | [NSApp disableRelaunchOnLogin]; 27 | [NSApp run]; 28 | } -------------------------------------------------------------------------------- /vendor/golang.design/x/mainthread/.gitignore: -------------------------------------------------------------------------------- 1 | # Binaries for programs and plugins 2 | *.exe 3 | *.exe~ 4 | *.dll 5 | *.so 6 | *.dylib 7 | 8 | # Test binary, built with `go test -c` 9 | *.test 10 | 11 | # Output of the go coverage tool, specifically when used with LiteIDE 12 | *.out 13 | 14 | # Dependency directories (remove the comment below to include it) 15 | # vendor/ 16 | -------------------------------------------------------------------------------- /vendor/golang.design/x/mainthread/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Changkun Ou 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /vendor/golang.design/x/mainthread/README.md: -------------------------------------------------------------------------------- 1 | # mainthread [![PkgGoDev](https://pkg.go.dev/badge/golang.design/x/mainthread)](https://pkg.go.dev/golang.design/x/mainthread) ![mainthread](https://github.com/golang-design/mainthread/workflows/mainthread/badge.svg?branch=main) ![](https://changkun.de/urlstat?mode=github&repo=golang-design/mainthread) 2 | 3 | schedule functions to run on the main thread 4 | 5 | ```go 6 | import "golang.design/x/mainthread" 7 | ``` 8 | 9 | ## Features 10 | 11 | - Main thread scheduling 12 | - Schedule functions without memory allocation 13 | 14 | ## API Usage 15 | 16 | Package mainthread offers facilities to schedule functions 17 | on the main thread. To use this package properly, one must 18 | call `mainthread.Init` from the main package. For example: 19 | 20 | ```go 21 | package main 22 | 23 | import "golang.design/x/mainthread" 24 | 25 | func main() { mainthread.Init(fn) } 26 | 27 | // fn is the actual main function 28 | func fn() { 29 | // ... do stuff ... 30 | 31 | // mainthread.Call returns when f1 returns. Note that if f1 blocks 32 | // it will also block the execution of any subsequent calls on the 33 | // main thread. 34 | mainthread.Call(f1) 35 | 36 | // ... do stuff ... 37 | 38 | 39 | // mainthread.Go returns immediately and f2 is scheduled to be 40 | // executed in the future. 41 | mainthread.Go(f2) 42 | 43 | // ... do stuff ... 44 | } 45 | 46 | func f1() { ... } 47 | func f2() { ... } 48 | ``` 49 | 50 | If the given function triggers a panic, and called via `mainthread.Call`, 51 | then the panic will be propagated to the same goroutine. One can capture 52 | that panic, when possible: 53 | 54 | ```go 55 | defer func() { 56 | if r := recover(); r != nil { 57 | println(r) 58 | } 59 | }() 60 | 61 | mainthread.Call(func() { ... }) // if panic 62 | ``` 63 | 64 | If the given function triggers a panic, and called via `mainthread.Go`, 65 | then the panic will be cached internally, until a call to the `Error()` method: 66 | 67 | ```go 68 | mainthread.Go(func() { ... }) // if panics 69 | 70 | // ... do stuff ... 71 | 72 | if err := mainthread.Error(); err != nil { // can be captured here. 73 | println(err) 74 | } 75 | ``` 76 | 77 | Note that a panic happens before `mainthread.Error()` returning the 78 | panicked error. If one needs to guarantee `mainthread.Error()` indeed 79 | captured the panic, a dummy function can be used as synchornization: 80 | 81 | ```go 82 | mainthread.Go(func() { panic("die") }) // if panics 83 | mainthread.Call(func() {}) // for execution synchronization 84 | err := mainthread.Error() // err must be non-nil 85 | ``` 86 | 87 | 88 | It is possible to cache up to a maximum of 42 panicked errors. 89 | More errors are ignored. 90 | 91 | ## When do you need this package? 92 | 93 | Read this to learn more about the design purpose of this package: 94 | https://golang.design/research/zero-alloc-call-sched/ 95 | 96 | ## Who is using this package? 97 | 98 | The initial purpose of building this package is to support writing 99 | graphical applications in Go. To know projects that are using this 100 | package, check our [wiki](https://github.com/golang-design/mainthread/wiki) 101 | page. 102 | 103 | 104 | ## License 105 | 106 | MIT | © 2021 The golang.design Initiative Authors, written by [Changkun Ou](https://changkun.de). -------------------------------------------------------------------------------- /vendor/golang.design/x/mainthread/mainthread.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020-2021 The golang.design Initiative Authors. 2 | // All rights reserved. Use of this source code is governed 3 | // by a MIT license that can be found in the LICENSE file. 4 | // 5 | // Written by Changkun Ou 6 | 7 | // Package mainthread offers facilities to schedule functions 8 | // on the main thread. To use this package properly, one must 9 | // call `mainthread.Init` from the main package. For example: 10 | // 11 | // package main 12 | // 13 | // import "golang.design/x/mainthread" 14 | // 15 | // func main() { mainthread.Init(fn) } 16 | // 17 | // // fn is the actual main function 18 | // func fn() { 19 | // // ... do stuff ... 20 | // 21 | // // mainthread.Call returns when f1 returns. Note that if f1 blocks 22 | // // it will also block the execution of any subsequent calls on the 23 | // // main thread. 24 | // mainthread.Call(f1) 25 | // 26 | // // ... do stuff ... 27 | // 28 | // 29 | // // mainthread.Go returns immediately and f2 is scheduled to be 30 | // // executed in the future. 31 | // mainthread.Go(f2) 32 | // 33 | // // ... do stuff ... 34 | // } 35 | // 36 | // func f1() { ... } 37 | // func f2() { ... } 38 | // 39 | // If the given function triggers a panic, and called via `mainthread.Call`, 40 | // then the panic will be propagated to the same goroutine. One can capture 41 | // that panic, when possible: 42 | // 43 | // defer func() { 44 | // if r := recover(); r != nil { 45 | // println(r) 46 | // } 47 | // }() 48 | // 49 | // mainthread.Call(func() { ... }) // if panic 50 | // 51 | // If the given function triggers a panic, and called via `mainthread.Go`, 52 | // then the panic will be cached internally, until a call to the `Error()` method: 53 | // 54 | // mainthread.Go(func() { ... }) // if panics 55 | // 56 | // // ... do stuff ... 57 | // 58 | // if err := mainthread.Error(); err != nil { // can be captured here. 59 | // println(err) 60 | // } 61 | // 62 | // Note that a panic happens before `mainthread.Error()` returning the 63 | // panicked error. If one needs to guarantee `mainthread.Error()` indeed 64 | // captured the panic, a dummy function can be used as synchornization: 65 | // 66 | // mainthread.Go(func() { panic("die") }) // if panics 67 | // mainthread.Call(func() {}) // for execution synchronization 68 | // err := mainthread.Error() // err must be non-nil 69 | // 70 | // It is possible to cache up to a maximum of 42 panicked errors. 71 | // More errors are ignored. 72 | package mainthread // import "golang.design/x/mainthread" 73 | 74 | import ( 75 | "fmt" 76 | "runtime" 77 | "sync" 78 | ) 79 | 80 | func init() { 81 | runtime.LockOSThread() 82 | } 83 | 84 | // Init initializes the functionality of running arbitrary subsequent 85 | // functions be called on the main system thread. 86 | // 87 | // Init must be called in the main.main function. 88 | func Init(main func()) { 89 | done := donePool.Get().(chan error) 90 | defer donePool.Put(done) 91 | 92 | go func() { 93 | defer func() { 94 | done <- nil 95 | }() 96 | main() 97 | }() 98 | 99 | for { 100 | select { 101 | case f := <-funcQ: 102 | func() { 103 | defer func() { 104 | r := recover() 105 | if f.done != nil { 106 | if r != nil { 107 | f.done <- fmt.Errorf("%v", r) 108 | } else { 109 | f.done <- nil 110 | } 111 | } else { 112 | if r != nil { 113 | select { 114 | case erroQ <- fmt.Errorf("%v", r): 115 | default: 116 | } 117 | } 118 | } 119 | }() 120 | f.fn() 121 | }() 122 | case <-done: 123 | return 124 | } 125 | } 126 | } 127 | 128 | // Call calls f on the main thread and blocks until f finishes. 129 | func Call(f func()) { 130 | done := donePool.Get().(chan error) 131 | defer donePool.Put(done) 132 | 133 | data := funcData{fn: f, done: done} 134 | funcQ <- data 135 | if err := <-done; err != nil { 136 | panic(err) 137 | } 138 | } 139 | 140 | // Go schedules f to be called on the main thread. 141 | func Go(f func()) { 142 | funcQ <- funcData{fn: f} 143 | } 144 | 145 | // Error returns an error that is captured if there are any panics 146 | // happened on the mainthread. 147 | // 148 | // It is possible to cache up to a maximum of 42 panicked errors. 149 | // More errors are ignored. 150 | func Error() error { 151 | select { 152 | case err := <-erroQ: 153 | return err 154 | default: 155 | return nil 156 | } 157 | } 158 | 159 | var ( 160 | funcQ = make(chan funcData, runtime.GOMAXPROCS(0)) 161 | erroQ = make(chan error, 42) 162 | donePool = sync.Pool{New: func() interface{} { 163 | return make(chan error) 164 | }} 165 | ) 166 | 167 | type funcData struct { 168 | fn func() 169 | done chan error 170 | } 171 | -------------------------------------------------------------------------------- /vendor/modules.txt: -------------------------------------------------------------------------------- 1 | # golang.design/x/mainthread v0.3.0 2 | ## explicit; go 1.16 3 | golang.design/x/mainthread 4 | --------------------------------------------------------------------------------