summaryrefslogtreecommitdiffstats
path: root/vendor/github.com
diff options
context:
space:
mode:
authorWim <wim@42.be>2022-11-27 00:42:16 +0100
committerGitHub <noreply@github.com>2022-11-27 00:42:16 +0100
commit4fd0a7672777f0ed15692ae2ba47838208537558 (patch)
treeb119834a8b9ee78aa8f1b2ad05efa7da50516cbf /vendor/github.com
parent6da9d567dc9195e9a5211f23a6795a41f56a1bfc (diff)
downloadmatterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.tar.gz
matterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.tar.bz2
matterbridge-msglm-4fd0a7672777f0ed15692ae2ba47838208537558.zip
Update dependencies (#1929)
Diffstat (limited to 'vendor/github.com')
-rw-r--r--vendor/github.com/d5/tengo/v2/script.go2
-rw-r--r--vendor/github.com/d5/tengo/v2/vm.go21
-rw-r--r--vendor/github.com/fsnotify/fsnotify/.gitignore10
-rw-r--r--vendor/github.com/fsnotify/fsnotify/AUTHORS62
-rw-r--r--vendor/github.com/fsnotify/fsnotify/CHANGELOG.md113
-rw-r--r--vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md72
-rw-r--r--vendor/github.com/fsnotify/fsnotify/LICENSE47
-rw-r--r--vendor/github.com/fsnotify/fsnotify/README.md205
-rw-r--r--vendor/github.com/fsnotify/fsnotify/backend_fen.go162
-rw-r--r--vendor/github.com/fsnotify/fsnotify/backend_inotify.go459
-rw-r--r--vendor/github.com/fsnotify/fsnotify/backend_kqueue.go707
-rw-r--r--vendor/github.com/fsnotify/fsnotify/backend_other.go66
-rw-r--r--vendor/github.com/fsnotify/fsnotify/backend_windows.go746
-rw-r--r--vendor/github.com/fsnotify/fsnotify/fen.go38
-rw-r--r--vendor/github.com/fsnotify/fsnotify/fsnotify.go80
-rw-r--r--vendor/github.com/fsnotify/fsnotify/fsnotify_unsupported.go36
-rw-r--r--vendor/github.com/fsnotify/fsnotify/inotify.go351
-rw-r--r--vendor/github.com/fsnotify/fsnotify/inotify_poller.go187
-rw-r--r--vendor/github.com/fsnotify/fsnotify/kqueue.go535
-rw-r--r--vendor/github.com/fsnotify/fsnotify/mkdoc.zsh208
-rw-r--r--vendor/github.com/fsnotify/fsnotify/system_bsd.go (renamed from vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go)4
-rw-r--r--vendor/github.com/fsnotify/fsnotify/system_darwin.go (renamed from vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go)4
-rw-r--r--vendor/github.com/fsnotify/fsnotify/windows.go586
-rw-r--r--vendor/github.com/gomarkdown/markdown/ast/node.go8
-rw-r--r--vendor/github.com/gomarkdown/markdown/parser/block.go10
-rw-r--r--vendor/github.com/gomarkdown/markdown/parser/inline.go1
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/kbchat.go5
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/test_utils.go5
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/api.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/blocking.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/chat_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/commands.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/common.go8
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/emoji.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/gregor.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/local.go50
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/notify.go4
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/remote.go30
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/unfurl.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth_internal.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth_update.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/common.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/incoming.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/outgoing.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/remind.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/account.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/airdrop.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/apiserver.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/appstate.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/audit.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/avatars.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/backend_common.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/badger.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/block.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/bot.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/btc.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/common.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/config.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/constants.go274
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/contacts.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/crypto.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/cryptocurrency.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ctl.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/debugging.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/delegate_ui_ctl.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/device.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/emails.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ephemeral.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/favorite.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/featured_bot.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/fs.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/git.go6
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gpg_common.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gpg_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gregor.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gregor_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/home.go6
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/home_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3_common.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify_common.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify_ui.go16
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/implicit_team_migration.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/incoming-share.go38
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/install.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/invite_friends.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs_common.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs_git.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfsmount.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisionee.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisionee2.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisioner.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kvstore.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/log.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/log_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/login.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/login_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/logsend.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/merkle.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/merkle_store.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/metadata.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/metadata_update.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/network_stats.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_app.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_audit.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_badges.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_can_user_perform.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_ctl.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_device_clone.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_email.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_ephemeral.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_favorites.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_featuredbots.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_fs.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_fs_request.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_invite_friends.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_keyfamily.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_paperkey.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_pgp.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_phone.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_runtimestats.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_saltpack.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_service.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_session.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_team.go31
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_teambot.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_tracking.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_users.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/os.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/paperprovision.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/passphrase_common.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pgp.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pgp_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/phone_numbers.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pprof.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/process.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove_common.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/provision_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/quota.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/reachability.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/rekey.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/rekey_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/reset.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/revoke.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/saltpack.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/saltpack_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/scanproofs.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/secret_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/secretkeys.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/selfprovision.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/session.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/signup.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/sigs.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/simple_fs.go14
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/stream_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teambot.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teams.go215
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teams_ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teamsearch.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/test.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/tlf.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/tlf_keys.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/track.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ui.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/upk.go6
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/user.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/usersearch.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/wot.go66
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/bundle.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/common.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/gregor.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/local.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/notify.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/remote.go2
-rw-r--r--vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/ui.go2
-rw-r--r--vendor/github.com/labstack/echo/v4/CHANGELOG.md14
-rw-r--r--vendor/github.com/labstack/echo/v4/README.md5
-rw-r--r--vendor/github.com/labstack/echo/v4/context.go2
-rw-r--r--vendor/github.com/labstack/echo/v4/middleware/cors.go88
-rw-r--r--vendor/github.com/labstack/gommon/bytes/bytes.go173
-rw-r--r--vendor/github.com/labstack/gommon/log/log.go6
-rw-r--r--vendor/github.com/slack-go/slack/dialog_text.go2
-rw-r--r--vendor/github.com/slack-go/slack/files.go2
-rw-r--r--vendor/github.com/slack-go/slack/info.go5
-rw-r--r--vendor/github.com/slack-go/slack/internal/backoff/backoff.go2
-rw-r--r--vendor/github.com/slack-go/slack/misc.go2
-rw-r--r--vendor/github.com/slack-go/slack/stars.go19
193 files changed, 3605 insertions, 2487 deletions
diff --git a/vendor/github.com/d5/tengo/v2/script.go b/vendor/github.com/d5/tengo/v2/script.go
index 82b02f52..4cca4d04 100644
--- a/vendor/github.com/d5/tengo/v2/script.go
+++ b/vendor/github.com/d5/tengo/v2/script.go
@@ -259,7 +259,7 @@ func (c *Compiled) Clone() *Compiled {
// copy global objects
for idx, g := range c.globals {
if g != nil {
- clone.globals[idx] = g
+ clone.globals[idx] = g.Copy()
}
}
return clone
diff --git a/vendor/github.com/d5/tengo/v2/vm.go b/vendor/github.com/d5/tengo/v2/vm.go
index c8365252..64bd23bc 100644
--- a/vendor/github.com/d5/tengo/v2/vm.go
+++ b/vendor/github.com/d5/tengo/v2/vm.go
@@ -376,8 +376,8 @@ func (v *VM) run() {
var lowIdx int64
if low != UndefinedValue {
- if low, ok := low.(*Int); ok {
- lowIdx = low.Value
+ if lowInt, ok := low.(*Int); ok {
+ lowIdx = lowInt.Value
} else {
v.err = fmt.Errorf("invalid slice index type: %s",
low.TypeName())
@@ -391,8 +391,8 @@ func (v *VM) run() {
var highIdx int64
if high == UndefinedValue {
highIdx = numElements
- } else if high, ok := high.(*Int); ok {
- highIdx = high.Value
+ } else if highInt, ok := high.(*Int); ok {
+ highIdx = highInt.Value
} else {
v.err = fmt.Errorf("invalid slice index type: %s",
high.TypeName())
@@ -428,8 +428,8 @@ func (v *VM) run() {
var highIdx int64
if high == UndefinedValue {
highIdx = numElements
- } else if high, ok := high.(*Int); ok {
- highIdx = high.Value
+ } else if highInt, ok := high.(*Int); ok {
+ highIdx = highInt.Value
} else {
v.err = fmt.Errorf("invalid slice index type: %s",
high.TypeName())
@@ -465,8 +465,8 @@ func (v *VM) run() {
var highIdx int64
if high == UndefinedValue {
highIdx = numElements
- } else if high, ok := high.(*Int); ok {
- highIdx = high.Value
+ } else if highInt, ok := high.(*Int); ok {
+ highIdx = highInt.Value
} else {
v.err = fmt.Errorf("invalid slice index type: %s",
high.TypeName())
@@ -502,8 +502,8 @@ func (v *VM) run() {
var highIdx int64
if high == UndefinedValue {
highIdx = numElements
- } else if high, ok := high.(*Int); ok {
- highIdx = high.Value
+ } else if highInt, ok := high.(*Int); ok {
+ highIdx = highInt.Value
} else {
v.err = fmt.Errorf("invalid slice index type: %s",
high.TypeName())
@@ -767,6 +767,7 @@ func (v *VM) run() {
NumLocals: fn.NumLocals,
NumParameters: fn.NumParameters,
VarArgs: fn.VarArgs,
+ SourceMap: fn.SourceMap,
Free: free,
}
v.allocs--
diff --git a/vendor/github.com/fsnotify/fsnotify/.gitignore b/vendor/github.com/fsnotify/fsnotify/.gitignore
index 4cd0cbaf..1d89d85c 100644
--- a/vendor/github.com/fsnotify/fsnotify/.gitignore
+++ b/vendor/github.com/fsnotify/fsnotify/.gitignore
@@ -1,6 +1,6 @@
-# Setup a Global .gitignore for OS and editor generated files:
-# https://help.github.com/articles/ignoring-files
-# git config --global core.excludesfile ~/.gitignore_global
+# go test -c output
+*.test
+*.test.exe
-.vagrant
-*.sublime-project
+# Output of go build ./cmd/fsnotify
+/fsnotify
diff --git a/vendor/github.com/fsnotify/fsnotify/AUTHORS b/vendor/github.com/fsnotify/fsnotify/AUTHORS
deleted file mode 100644
index 6cbabe5e..00000000
--- a/vendor/github.com/fsnotify/fsnotify/AUTHORS
+++ /dev/null
@@ -1,62 +0,0 @@
-# Names should be added to this file as
-# Name or Organization <email address>
-# The email address is not required for organizations.
-
-# You can update this list using the following command:
-#
-# $ (head -n10 AUTHORS && git shortlog -se | sed -E 's/^\s+[0-9]+\t//') | tee AUTHORS
-
-# Please keep the list sorted.
-
-Aaron L <aaron@bettercoder.net>
-Adrien Bustany <adrien@bustany.org>
-Alexey Kazakov <alkazako@redhat.com>
-Amit Krishnan <amit.krishnan@oracle.com>
-Anmol Sethi <me@anmol.io>
-Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
-Brian Goff <cpuguy83@gmail.com>
-Bruno Bigras <bigras.bruno@gmail.com>
-Caleb Spare <cespare@gmail.com>
-Case Nelson <case@teammating.com>
-Chris Howey <howeyc@gmail.com>
-Christoffer Buchholz <christoffer.buchholz@gmail.com>
-Daniel Wagner-Hall <dawagner@gmail.com>
-Dave Cheney <dave@cheney.net>
-Eric Lin <linxiulei@gmail.com>
-Evan Phoenix <evan@fallingsnow.net>
-Francisco Souza <f@souza.cc>
-Gautam Dey <gautam.dey77@gmail.com>
-Hari haran <hariharan.uno@gmail.com>
-Ichinose Shogo <shogo82148@gmail.com>
-Johannes Ebke <johannes@ebke.org>
-John C Barstow <jbowtie@amathaine.com>
-Kelvin Fo <vmirage@gmail.com>
-Ken-ichirou MATSUZAWA <chamas@h4.dion.ne.jp>
-Matt Layher <mdlayher@gmail.com>
-Matthias Stone <matthias@bellstone.ca>
-Nathan Youngman <git@nathany.com>
-Nickolai Zeldovich <nickolai@csail.mit.edu>
-Oliver Bristow <evilumbrella+github@gmail.com>
-Patrick <patrick@dropbox.com>
-Paul Hammond <paul@paulhammond.org>
-Pawel Knap <pawelknap88@gmail.com>
-Pieter Droogendijk <pieter@binky.org.uk>
-Pratik Shinde <pratikshinde320@gmail.com>
-Pursuit92 <JoshChase@techpursuit.net>
-Riku Voipio <riku.voipio@linaro.org>
-Rob Figueiredo <robfig@gmail.com>
-Rodrigo Chiossi <rodrigochiossi@gmail.com>
-Slawek Ligus <root@ooz.ie>
-Soge Zhang <zhssoge@gmail.com>
-Tiffany Jernigan <tiffany.jernigan@intel.com>
-Tilak Sharma <tilaks@google.com>
-Tobias Klauser <tobias.klauser@gmail.com>
-Tom Payne <twpayne@gmail.com>
-Travis Cline <travis.cline@gmail.com>
-Tudor Golubenco <tudor.g@gmail.com>
-Vahe Khachikyan <vahe@live.ca>
-Yukang <moorekang@gmail.com>
-bronze1man <bronze1man@gmail.com>
-debrando <denis.brandolini@gmail.com>
-henrikedwards <henrik.edwards@gmail.com>
-铁哥 <guotie.9@gmail.com>
diff --git a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
index cc01c08f..77f9593b 100644
--- a/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
+++ b/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md
@@ -7,6 +7,95 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
+Nothing yet.
+
+## [1.6.0] - 2022-10-13
+
+This version of fsnotify needs Go 1.16 (this was already the case since 1.5.1,
+but not documented). It also increases the minimum Linux version to 2.6.32.
+
+### Additions
+
+- all: add `Event.Has()` and `Op.Has()` ([#477])
+
+ This makes checking events a lot easier; for example:
+
+ if event.Op&Write == Write && !(event.Op&Remove == Remove) {
+ }
+
+ Becomes:
+
+ if event.Has(Write) && !event.Has(Remove) {
+ }
+
+- all: add cmd/fsnotify ([#463])
+
+ A command-line utility for testing and some examples.
+
+### Changes and fixes
+
+- inotify: don't ignore events for files that don't exist ([#260], [#470])
+
+ Previously the inotify watcher would call `os.Lstat()` to check if a file
+ still exists before emitting events.
+
+ This was inconsistent with other platforms and resulted in inconsistent event
+ reporting (e.g. when a file is quickly removed and re-created), and generally
+ a source of confusion. It was added in 2013 to fix a memory leak that no
+ longer exists.
+
+- all: return `ErrNonExistentWatch` when `Remove()` is called on a path that's
+ not watched ([#460])
+
+- inotify: replace epoll() with non-blocking inotify ([#434])
+
+ Non-blocking inotify was not generally available at the time this library was
+ written in 2014, but now it is. As a result, the minimum Linux version is
+ bumped from 2.6.27 to 2.6.32. This hugely simplifies the code and is faster.
+
+- kqueue: don't check for events every 100ms ([#480])
+
+ The watcher would wake up every 100ms, even when there was nothing to do. Now
+ it waits until there is something to do.
+
+- macos: retry opening files on EINTR ([#475])
+
+- kqueue: skip unreadable files ([#479])
+
+ kqueue requires a file descriptor for every file in a directory; this would
+ fail if a file was unreadable by the current user. Now these files are simply
+ skipped.
+
+- windows: fix renaming a watched directory if the parent is also watched ([#370])
+
+- windows: increase buffer size from 4K to 64K ([#485])
+
+- windows: close file handle on Remove() ([#288])
+
+- kqueue: put pathname in the error if watching a file fails ([#471])
+
+- inotify, windows: calling Close() more than once could race ([#465])
+
+- kqueue: improve Close() performance ([#233])
+
+- all: various documentation additions and clarifications.
+
+[#233]: https://github.com/fsnotify/fsnotify/pull/233
+[#260]: https://github.com/fsnotify/fsnotify/pull/260
+[#288]: https://github.com/fsnotify/fsnotify/pull/288
+[#370]: https://github.com/fsnotify/fsnotify/pull/370
+[#434]: https://github.com/fsnotify/fsnotify/pull/434
+[#460]: https://github.com/fsnotify/fsnotify/pull/460
+[#463]: https://github.com/fsnotify/fsnotify/pull/463
+[#465]: https://github.com/fsnotify/fsnotify/pull/465
+[#470]: https://github.com/fsnotify/fsnotify/pull/470
+[#471]: https://github.com/fsnotify/fsnotify/pull/471
+[#475]: https://github.com/fsnotify/fsnotify/pull/475
+[#477]: https://github.com/fsnotify/fsnotify/pull/477
+[#479]: https://github.com/fsnotify/fsnotify/pull/479
+[#480]: https://github.com/fsnotify/fsnotify/pull/480
+[#485]: https://github.com/fsnotify/fsnotify/pull/485
+
## [1.5.4] - 2022-04-25
* Windows: add missing defer to `Watcher.WatchList` [#447](https://github.com/fsnotify/fsnotify/pull/447)
@@ -40,6 +129,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
[#385](https://github.com/fsnotify/fsnotify/pull/385)
* Go 1.14+: Fix unsafe pointer conversion [#325](https://github.com/fsnotify/fsnotify/pull/325)
+## [1.4.9] - 2020-03-11
+
+* Move example usage to the readme #329. This may resolve #328.
+
+## [1.4.8] - 2020-03-10
+
+* CI: test more go versions (@nathany 1d13583d846ea9d66dcabbfefbfb9d8e6fb05216)
+* Tests: Queued inotify events could have been read by the test before max_queued_events was hit (@matthias-stone #265)
+* Tests: t.Fatalf -> t.Errorf in go routines (@gdey #266)
+* CI: Less verbosity (@nathany #267)
+* Tests: Darwin: Exchangedata is deprecated on 10.13 (@nathany #267)
+* Tests: Check if channels are closed in the example (@alexeykazakov #244)
+* CI: Only run golint on latest version of go and fix issues (@cpuguy83 #284)
+* CI: Add windows to travis matrix (@cpuguy83 #284)
+* Docs: Remover appveyor badge (@nathany 11844c0959f6fff69ba325d097fce35bd85a8e93)
+* Linux: create epoll and pipe fds with close-on-exec (@JohannesEbke #219)
+* Linux: open files with close-on-exec (@linxiulei #273)
+* Docs: Plan to support fanotify (@nathany ab058b44498e8b7566a799372a39d150d9ea0119 )
+* Project: Add go.mod (@nathany #309)
+* Project: Revise editor config (@nathany #309)
+* Project: Update copyright for 2019 (@nathany #309)
+* CI: Drop go1.8 from CI matrix (@nathany #309)
+* Docs: Updating the FAQ section for supportability with NFS & FUSE filesystems (@Pratik32 4bf2d1fec78374803a39307bfb8d340688f4f28e )
+
## [1.4.7] - 2018-01-09
* BSD/macOS: Fix possible deadlock on closing the watcher on kqueue (thanks @nhooyr and @glycerine)
diff --git a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
index 8a642563..ea379759 100644
--- a/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
+++ b/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md
@@ -1,60 +1,26 @@
-# Contributing
+Thank you for your interest in contributing to fsnotify! We try to review and
+merge PRs in a reasonable timeframe, but please be aware that:
-## Issues
+- To avoid "wasted" work, please discus changes on the issue tracker first. You
+ can just send PRs, but they may end up being rejected for one reason or the
+ other.
-* Request features and report bugs using the [GitHub Issue Tracker](https://github.com/fsnotify/fsnotify/issues).
-* Please indicate the platform you are using fsnotify on.
-* A code example to reproduce the problem is appreciated.
+- fsnotify is a cross-platform library, and changes must work reasonably well on
+ all supported platforms.
-## Pull Requests
+- Changes will need to be compatible; old code should still compile, and the
+ runtime behaviour can't change in ways that are likely to lead to problems for
+ users.
-### Contributor License Agreement
+Testing
+-------
+Just `go test ./...` runs all the tests; the CI runs this on all supported
+platforms. Testing different platforms locally can be done with something like
+[goon] or [Vagrant], but this isn't super-easy to set up at the moment.
-fsnotify is derived from code in the [golang.org/x/exp](https://godoc.org/golang.org/x/exp) package and it may be included [in the standard library](https://github.com/fsnotify/fsnotify/issues/1) in the future. Therefore fsnotify carries the same [LICENSE](https://github.com/fsnotify/fsnotify/blob/master/LICENSE) as Go. Contributors retain their copyright, so you need to fill out a short form before we can accept your contribution: [Google Individual Contributor License Agreement](https://developers.google.com/open-source/cla/individual).
+Use the `-short` flag to make the "stress test" run faster.
-Please indicate that you have signed the CLA in your pull request.
-### How fsnotify is Developed
-
-* Development is done on feature branches.
-* Tests are run on BSD, Linux, macOS and Windows.
-* Pull requests are reviewed and [applied to master][am] using [hub][].
- * Maintainers may modify or squash commits rather than asking contributors to.
-* To issue a new release, the maintainers will:
- * Update the CHANGELOG
- * Tag a version, which will become available through gopkg.in.
-
-### How to Fork
-
-For smooth sailing, always use the original import path. Installing with `go get` makes this easy.
-
-1. Install from GitHub (`go get -u github.com/fsnotify/fsnotify`)
-2. Create your feature branch (`git checkout -b my-new-feature`)
-3. Ensure everything works and the tests pass (see below)
-4. Commit your changes (`git commit -am 'Add some feature'`)
-
-Contribute upstream:
-
-1. Fork fsnotify on GitHub
-2. Add your remote (`git remote add fork git@github.com:mycompany/repo.git`)
-3. Push to the branch (`git push fork my-new-feature`)
-4. Create a new Pull Request on GitHub
-
-This workflow is [thoroughly explained by Katrina Owen](https://splice.com/blog/contributing-open-source-git-repositories-go/).
-
-### Testing
-
-fsnotify uses build tags to compile different code on Linux, BSD, macOS, and Windows.
-
-Before doing a pull request, please do your best to test your changes on multiple platforms, and list which platforms you were able/unable to test on.
-
-### Maintainers
-
-Help maintaining fsnotify is welcome. To be a maintainer:
-
-* Submit a pull request and sign the CLA as above.
-* You must be able to run the test suite on Mac, Windows, Linux and BSD.
-
-All code changes should be internal pull requests.
-
-Releases are tagged using [Semantic Versioning](http://semver.org/).
+[goon]: https://github.com/arp242/goon
+[Vagrant]: https://www.vagrantup.com/
+[integration_test.go]: /integration_test.go
diff --git a/vendor/github.com/fsnotify/fsnotify/LICENSE b/vendor/github.com/fsnotify/fsnotify/LICENSE
index e180c8fb..fb03ade7 100644
--- a/vendor/github.com/fsnotify/fsnotify/LICENSE
+++ b/vendor/github.com/fsnotify/fsnotify/LICENSE
@@ -1,28 +1,25 @@
-Copyright (c) 2012 The Go Authors. All rights reserved.
-Copyright (c) 2012-2019 fsnotify Authors. All rights reserved.
+Copyright © 2012 The Go Authors. All rights reserved.
+Copyright © fsnotify Authors. All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
- * Redistributions of source code must retain the above copyright
-notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above
-copyright notice, this list of conditions and the following disclaimer
-in the documentation and/or other materials provided with the
-distribution.
- * Neither the name of Google Inc. nor the names of its
-contributors may be used to endorse or promote products derived from
-this software without specific prior written permission.
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+* Redistributions in binary form must reproduce the above copyright notice, this
+ list of conditions and the following disclaimer in the documentation and/or
+ other materials provided with the distribution.
+* Neither the name of Google Inc. nor the names of its contributors may be used
+ to endorse or promote products derived from this software without specific
+ prior written permission.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/vendor/github.com/fsnotify/fsnotify/README.md b/vendor/github.com/fsnotify/fsnotify/README.md
index 0731c5ef..d4e6080f 100644
--- a/vendor/github.com/fsnotify/fsnotify/README.md
+++ b/vendor/github.com/fsnotify/fsnotify/README.md
@@ -1,120 +1,161 @@
-# File system notifications for Go
+fsnotify is a Go library to provide cross-platform filesystem notifications on
+Windows, Linux, macOS, and BSD systems.
-[![Go Reference](https://pkg.go.dev/badge/github.com/fsnotify/fsnotify.svg)](https://pkg.go.dev/github.com/fsnotify/fsnotify) [![Go Report Card](https://goreportcard.com/badge/github.com/fsnotify/fsnotify)](https://goreportcard.com/report/github.com/fsnotify/fsnotify) [![Maintainers Wanted](https://img.shields.io/badge/maintainers-wanted-red.svg)](https://github.com/fsnotify/fsnotify/issues/413)
+Go 1.16 or newer is required; the full documentation is at
+https://pkg.go.dev/github.com/fsnotify/fsnotify
-fsnotify utilizes [`golang.org/x/sys`](https://pkg.go.dev/golang.org/x/sys) rather than [`syscall`](https://pkg.go.dev/syscall) from the standard library.
+**It's best to read the documentation at pkg.go.dev, as it's pinned to the last
+released version, whereas this README is for the last development version which
+may include additions/changes.**
-Cross platform: Windows, Linux, BSD and macOS.
+---
-| Adapter | OS | Status |
-| --------------------- | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
-| inotify | Linux 2.6.27 or later, Android\* | Supported |
-| kqueue | BSD, macOS, iOS\* | Supported |
-| ReadDirectoryChangesW | Windows | Supported |
-| FSEvents | macOS | [Planned](https://github.com/fsnotify/fsnotify/issues/11) |
-| FEN | Solaris 11 | [In Progress](https://github.com/fsnotify/fsnotify/pull/371) |
-| fanotify | Linux 2.6.37+ | [Maybe](https://github.com/fsnotify/fsnotify/issues/114) |
-| USN Journals | Windows | [Maybe](https://github.com/fsnotify/fsnotify/issues/53) |
-| Polling | *All* | [Maybe](https://github.com/fsnotify/fsnotify/issues/9) |
+Platform support:
-\* Android and iOS are untested.
+| Adapter | OS | Status |
+| --------------------- | ---------------| -------------------------------------------------------------|
+| inotify | Linux 2.6.32+ | Supported |
+| kqueue | BSD, macOS | Supported |
+| ReadDirectoryChangesW | Windows | Supported |
+| FSEvents | macOS | [Planned](https://github.com/fsnotify/fsnotify/issues/11) |
+| FEN | Solaris 11 | [In Progress](https://github.com/fsnotify/fsnotify/pull/371) |
+| fanotify | Linux 5.9+ | [Maybe](https://github.com/fsnotify/fsnotify/issues/114) |
+| USN Journals | Windows | [Maybe](https://github.com/fsnotify/fsnotify/issues/53) |
+| Polling | *All* | [Maybe](https://github.com/fsnotify/fsnotify/issues/9) |
-Please see [the documentation](https://pkg.go.dev/github.com/fsnotify/fsnotify) and consult the [FAQ](#faq) for usage information.
+Linux and macOS should include Android and iOS, but these are currently untested.
-## API stability
-
-fsnotify is a fork of [howeyc/fsnotify](https://github.com/howeyc/fsnotify) with a new API as of v1.0. The API is based on [this design document](http://goo.gl/MrYxyA).
-
-All [releases](https://github.com/fsnotify/fsnotify/releases) are tagged based on [Semantic Versioning](http://semver.org/).
-
-## Usage
+Usage
+-----
+A basic example:
```go
package main
import (
- "log"
+ "log"
- "github.com/fsnotify/fsnotify"
+ "github.com/fsnotify/fsnotify"
)
func main() {
- watcher, err := fsnotify.NewWatcher()
- if err != nil {
- log.Fatal(err)
- }
- defer watcher.Close()
-
- done := make(chan bool)
- go func() {
- for {
- select {
- case event, ok := <-watcher.Events:
- if !ok {
- return
- }
- log.Println("event:", event)
- if event.Op&fsnotify.Write == fsnotify.Write {
- log.Println("modified file:", event.Name)
- }
- case err, ok := <-watcher.Errors:
- if !ok {
- return
- }
- log.Println("error:", err)
- }
- }
- }()
-
- err = watcher.Add("/tmp/foo")
- if err != nil {
- log.Fatal(err)
- }
- <-done
+ // Create new watcher.
+ watcher, err := fsnotify.NewWatcher()
+ if err != nil {
+ log.Fatal(err)
+ }
+ defer watcher.Close()
+
+ // Start listening for events.
+ go func() {
+ for {
+ select {
+ case event, ok := <-watcher.Events:
+ if !ok {
+ return
+ }
+ log.Println("event:", event)
+ if event.Has(fsnotify.Write) {
+ log.Println("modified file:", event.Name)
+ }
+ case err, ok := <-watcher.Errors:
+ if !ok {
+ return
+ }
+ log.Println("error:", err)
+ }
+ }
+ }()
+
+ // Add a path.
+ err = watcher.Add("/tmp")
+ if err != nil {
+ log.Fatal(err)
+ }
+
+ // Block main goroutine forever.
+ <-make(chan struct{})
}
```
-## Contributing
+Some more examples can be found in [cmd/fsnotify](cmd/fsnotify), which can be
+run with:
-Please refer to [CONTRIBUTING][] before opening an issue or pull request.
+ % go run ./cmd/fsnotify
-## FAQ
+FAQ
+---
+### Will a file still be watched when it's moved to another directory?
+No, not unless you are watching the location it was moved to.
-**When a file is moved to another directory is it still being watched?**
+### Are subdirectories watched too?
+No, you must add watches for any directory you want to watch (a recursive
+watcher is on the roadmap: [#18]).
-No (it shouldn't be, unless you are watching where it was moved to).
+[#18]: https://github.com/fsnotify/fsnotify/issues/18
-**When I watch a directory, are all subdirectories watched as well?**
+### Do I have to watch the Error and Event channels in a goroutine?
+As of now, yes (you can read both channels in the same goroutine using `select`,
+you don't need a separate goroutine for both channels; see the example).
-No, you must add watches for any directory you want to watch (a recursive watcher is on the roadmap [#18][]).
+### Why don't notifications work with NFS, SMB, FUSE, /proc, or /sys?
+fsnotify requires support from underlying OS to work. The current NFS and SMB
+protocols does not provide network level support for file notifications, and
+neither do the /proc and /sys virtual filesystems.
-**Do I have to watch the Error and Event channels in a separate goroutine?**
+This could be fixed with a polling watcher ([#9]), but it's not yet implemented.
-As of now, yes. Looking into making this single-thread friendly (see [howeyc #7][#7])
+[#9]: https://github.com/fsnotify/fsnotify/issues/9
-**Why am I receiving multiple events for the same file on OS X?**
+Platform-specific notes
+-----------------------
+### Linux
+When a file is removed a REMOVE event won't be emitted until all file
+descriptors are closed; it will emit a CHMOD instead:
-Spotlight indexing on OS X can result in multiple events (see [howeyc #62][#62]). A temporary workaround is to add your folder(s) to the *Spotlight Privacy settings* until we have a native FSEvents implementation (see [#11][]).
+ fp := os.Open("file")
+ os.Remove("file") // CHMOD
+ fp.Close() // REMOVE
-**How many files can be watched at once?**
+This is the event that inotify sends, so not much can be changed about this.
-There are OS-specific limits as to how many watches can be created:
-* Linux: /proc/sys/fs/inotify/max_user_watches contains the limit, reaching this limit results in a "no space left on device" error.
-* BSD / OSX: sysctl variables "kern.maxfiles" and "kern.maxfilesperproc", reaching these limits results in a "too many open files" error.
+The `fs.inotify.max_user_watches` sysctl variable specifies the upper limit for
+the number of watches per user, and `fs.inotify.max_user_instances` specifies
+the maximum number of inotify instances per user. Every Watcher you create is an
+"instance", and every path you add is a "watch".
-**Why don't notifications work with NFS filesystems or filesystem in userspace (FUSE)?**
+These are also exposed in `/proc` as `/proc/sys/fs/inotify/max_user_watches` and
+`/proc/sys/fs/inotify/max_user_instances`
-fsnotify requires support from underlying OS to work. The current NFS protocol does not provide network level support for file notifications.
+To increase them you can use `sysctl` or write the value to proc file:
-[#62]: https://github.com/howeyc/fsnotify/issues/62
-[#18]: https://github.com/fsnotify/fsnotify/issues/18
-[#11]: https://github.com/fsnotify/fsnotify/issues/11
-[#7]: https://github.com/howeyc/fsnotify/issues/7
+ # The default values on Linux 5.18
+ sysctl fs.inotify.max_user_watches=124983
+ sysctl fs.inotify.max_user_instances=128
+
+To make the changes persist on reboot edit `/etc/sysctl.conf` or
+`/usr/lib/sysctl.d/50-default.conf` (details differ per Linux distro; check your
+distro's documentation):
+
+ fs.inotify.max_user_watches=124983
+ fs.inotify.max_user_instances=128
-[contributing]: https://github.com/fsnotify/fsnotify/blob/master/CONTRIBUTING.md
+Reaching the limit will result in a "no space left on device" or "too many open
+files" error.
-## Related Projects
+### kqueue (macOS, all BSD systems)
+kqueue requires opening a file descriptor for every file that's being watched;
+so if you're watching a directory with five files then that's six file
+descriptors. You will run in to your system's "max open files" limit faster on
+these platforms.
-* [notify](https://github.com/rjeczalik/notify)
-* [fsevents](https://github.com/fsnotify/fsevents)
+The sysctl variables `kern.maxfiles` and `kern.maxfilesperproc` can be used to
+control the maximum number of open files.
+### macOS
+Spotlight indexing on macOS can result in multiple events (see [#15]). A temporary
+workaround is to add your folder(s) to the *Spotlight Privacy settings* until we
+have a native FSEvents implementation (see [#11]).
+
+[#11]: https://github.com/fsnotify/fsnotify/issues/11
+[#15]: https://github.com/fsnotify/fsnotify/issues/15
diff --git a/vendor/github.com/fsnotify/fsnotify/backend_fen.go b/vendor/github.com/fsnotify/fsnotify/backend_fen.go
new file mode 100644
index 00000000..1a95ad8e
--- /dev/null
+++ b/vendor/github.com/fsnotify/fsnotify/backend_fen.go
@@ -0,0 +1,162 @@
+//go:build solaris
+// +build solaris
+
+package fsnotify
+
+import (
+ "errors"
+)
+
+// Watcher watches a set of paths, delivering events on a channel.
+//
+// A watcher should not be copied (e.g. pass it by pointer, rather than by
+// value).
+//
+// # Linux notes
+//
+// When a file is removed a Remove event won't be emitted until all file
+// descriptors are closed, and deletes will always emit a Chmod. For example:
+//
+// fp := os.Open("file")
+// os.Remove("file") // Triggers Chmod
+// fp.Close() // Triggers Remove
+//
+// This is the event that inotify sends, so not much can be changed about this.
+//
+// The fs.inotify.max_user_watches sysctl variable specifies the upper limit
+// for the number of watches per user, and fs.inotify.max_user_instances
+// specifies the maximum number of inotify instances per user. Every Watcher you
+// create is an "instance", and every path you add is a "watch".
+//
+// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and
+// /proc/sys/fs/inotify/max_user_instances
+//
+// To increase them you can use sysctl or write the value to the /proc file:
+//
+// # Default values on Linux 5.18
+// sysctl fs.inotify.max_user_watches=124983
+// sysctl fs.inotify.max_user_instances=128
+//
+// To make the changes persist on reboot edit /etc/sysctl.conf or
+// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check
+// your distro's documentation):
+//
+// fs.inotify.max_user_watches=124983
+// fs.inotify.max_user_instances=128
+//
+// Reaching the limit will result in a "no space left on device" or "too many open
+// files" error.
+//
+// # kqueue notes (macOS, BSD)
+//
+// kqueue requires opening a file descriptor for every file that's being watched;
+// so if you're watching a directory with five files then that's six file
+// descriptors. You will run in to your system's "max open files" limit faster on
+// these platforms.
+//
+// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to
+// control the maximum number of open files, as well as /etc/login.conf on BSD
+// systems.
+//
+// # macOS notes
+//
+// Spotlight indexing on macOS can result in multiple events (see [#15]). A
+// temporary workaround is to add your folder(s) to the "Spotlight Privacy
+// Settings" until we have a native FSEvents implementation (see [#11]).
+//
+// [#11]: https://github.com/fsnotify/fsnotify/issues/11
+// [#15]: https://github.com/fsnotify/fsnotify/issues/15
+type Watcher struct {
+ // Events sends the filesystem change events.
+ //
+ // fsnotify can send the following events; a "path" here can refer to a
+ // file, directory, symbolic link, or special file like a FIFO.
+ //
+ // fsnotify.Create A new path was created; this may be followed by one
+ // or more Write events if data also gets written to a
+ // file.
+ //
+ // fsnotify.Remove A path was removed.
+ //
+ // fsnotify.Rename A path was renamed. A rename is always sent with the
+ // old path as Event.Name, and a Create event will be
+ // sent with the new name. Renames are only sent for
+ // paths that are currently watched; e.g. moving an
+ // unmonitored file into a monitored directory will
+ // show up as just a Create. Similarly, renaming a file
+ // to outside a monitored directory will show up as
+ // only a Rename.
+ //
+ // fsnotify.Write A file or named pipe was written to. A Truncate will
+ // also trigger a Write. A single "write action"
+ // initiated by the user may show up as one or multiple
+ // writes, depending on when the system syncs things to
+ // disk. For example when compiling a large Go program
+ // you may get hundreds of Write events, so you
+ // probably want to wait until you've stopped receiving
+ // them (see the dedup example in cmd/fsnotify).
+ //
+ // fsnotify.Chmod Attributes were changed. On Linux this is also sent
+ // when a file is removed (or more accurately, when a
+ // link to an inode is removed). On kqueue it's sent
+ // and on kqueue when a file is truncated. On Windows
+ // it's never sent.
+ Events chan Event
+
+ // Errors sends any errors.
+ Errors chan error
+}
+
+// NewWatcher creates a new Watcher.
+func NewWatcher() (*Watcher, error) {
+ return nil, errors.New("FEN based watcher not yet supported for fsnotify\n")
+}
+
+// Close removes all watches and closes the events channel.
+func (w *Watcher) Close() error {
+ return nil
+}
+
+// Add starts monitoring the path for changes.
+//
+// A path can only be watched once; attempting to watch it more than once will
+// return an error. Paths that do not yet exist on the filesystem cannot be
+// added. A watch will be automatically removed if the path is deleted.
+//
+// A path will remain watched if it gets renamed to somewhere else on the same
+// filesystem, but the monitor will get removed if the path gets deleted and
+// re-created, or if it's moved to a different filesystem.
+//
+// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special
+// filesystems (/proc, /sys, etc.) generally don't work.
+//
+// # Watching directories
+//
+// All files in a directory are monitored, including new files that are created
+// after the watcher is started. Subdirectories are not watched (i.e. it's
+// non-recursive).
+//
+// # Watching files
+//
+// Watching individual files (rather than directories) is generally not
+// recommended as many tools update files atomically. Instead of "just" writing
+// to the file a temporary file will be written to first, and if successful the
+// temporary file is moved to to destination removing the original, or some
+// variant thereof. The watcher on the original file is now lost, as it no
+// longer exists.
+//
+// Instead, watch the parent directory and use Event.Name to filter out files
+// you're not interested in. There is an example of this in [cmd/fsnotify/file.go].
+func (w *Watcher) Add(name string) error {
+ return nil
+}
+
+// Remove stops monitoring the path for changes.
+//
+// Directories are always removed non-recursively. For example, if you added
+// /tmp/dir and /tmp/dir/subdir then you will need to remove both.
+//
+// Removing a path that has not yet been added returns [ErrNonExistentWatch].
+func (w *Watcher) Remove(name string) error {
+ return nil
+}
diff --git a/vendor/github.com/fsnotify/fsnotify/backend_inotify.go b/vendor/github.com/fsnotify/fsnotify/backend_inotify.go
new file mode 100644
index 00000000..54c77fbb
--- /dev/null
+++ b/vendor/github.com/fsnotify/fsnotify/backend_inotify.go
@@ -0,0 +1,459 @@
+//go:build linux
+// +build linux
+
+package fsnotify
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "os"
+ "path/filepath"
+ "strings"
+ "sync"
+ "unsafe"
+
+ "golang.org/x/sys/unix"
+)
+
+// Watcher watches a set of paths, delivering events on a channel.
+//
+// A watcher should not be copied (e.g. pass it by pointer, rather than by
+// value).
+//
+// # Linux notes
+//
+// When a file is removed a Remove event won't be emitted until all file
+// descriptors are closed, and deletes will always emit a Chmod. For example:
+//
+// fp := os.Open("file")
+// os.Remove("file") // Triggers Chmod
+// fp.Close() // Triggers Remove
+//
+// This is the event that inotify sends, so not much can be changed about this.
+//
+// The fs.inotify.max_user_watches sysctl variable specifies the upper limit
+// for the number of watches per user, and fs.inotify.max_user_instances
+// specifies the maximum number of inotify instances per user. Every Watcher you
+// create is an "instance", and every path you add is a "watch".
+//
+// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and
+// /proc/sys/fs/inotify/max_user_instances
+//
+// To increase them you can use sysctl or write the value to the /proc file:
+//
+// # Default values on Linux 5.18
+// sysctl fs.inotify.max_user_watches=124983
+// sysctl fs.inotify.max_user_instances=128
+//
+// To make the changes persist on reboot edit /etc/sysctl.conf or
+// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check
+// your distro's documentation):
+//
+// fs.inotify.max_user_watches=124983
+// fs.inotify.max_user_instances=128
+//
+// Reaching the limit will result in a "no space left on device" or "too many open
+// files" error.
+//
+// # kqueue notes (macOS, BSD)
+//
+// kqueue requires opening a file descriptor for every file that's being watched;
+// so if you're watching a directory with five files then that's six file
+// descriptors. You will run in to your system's "max open files" limit faster on
+// these platforms.
+//
+// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to
+// control the maximum number of open files, as well as /etc/login.conf on BSD
+// systems.
+//
+// # macOS notes
+//
+// Spotlight indexing on macOS can result in multiple events (see [#15]). A
+// temporary workaround is to add your folder(s) to the "Spotlight Privacy
+// Settings" until we have a native FSEvents implementation (see [#11]).
+//
+// [#11]: https://github.com/fsnotify/fsnotify/issues/11
+// [#15]: https://github.com/fsnotify/fsnotify/issues/15
+type Watcher struct {
+ // Events sends the filesystem change events.
+ //
+ // fsnotify can send the following events; a "path" here can refer to a
+ // file, directory, symbolic link, or special file like a FIFO.
+ //
+ // fsnotify.Create A new path was created; this may be followed by one
+ // or more Write events if data also gets written to a
+ // file.
+ //
+ // fsnotify.Remove A path was removed.
+ //
+ // fsnotify.Rename A path was renamed. A rename is always sent with the
+ // old path as Event.Name, and a Create event will be
+ // sent with the new name. Renames are only sent for
+ // paths that are currently watched; e.g. moving an
+ // unmonitored file into a monitored directory will
+ // show up as just a Create. Similarly, renaming a file
+ // to outside a monitored directory will show up as
+ // only a Rename.
+ //
+ // fsnotify.Write A file or named pipe was written to. A Truncate will
+ // also trigger a Write. A single "write action"
+ // initiated by the user may show up as one or multiple
+ // writes, depending on when the system syncs things to
+ // disk. For example when compiling a large Go program
+ // you may get hundreds of Write events, so you
+ // probably want to wait until you've stopped receiving
+ // them (see the dedup example in cmd/fsnotify).
+ //
+ // fsnotify.Chmod Attributes were changed. On Linux this is also sent
+ // when a file is removed (or more accurately, when a
+ // link to an inode is removed). On kqueue it's sent
+ // and on kqueue when a file is truncated. On Windows
+ // it's never sent.
+ Events chan Event
+
+ // Errors sends any errors.
+ Errors chan error
+
+ // Store fd here as os.File.Read() will no longer return on close after
+ // calling Fd(). See: https://github.com/golang/go/issues/26439
+ fd int
+ mu sync.Mutex // Map access
+ inotifyFile *os.File
+ watches map[string]*watch // Map of inotify watches (key: path)
+ paths map[int]string // Map of watched paths (key: watch descriptor)
+ done chan struct{} // Channel for sending a "quit message" to the reader goroutine
+ doneResp chan struct{} // Channel to respond to Close
+}
+
+// NewWatcher creates a new Watcher.
+func NewWatcher() (*Watcher, error) {
+ // Create inotify fd
+ // Need to set the FD to nonblocking mode in order for SetDeadline methods to work
+ // Otherwise, blocking i/o operations won't terminate on close
+ fd, errno := unix.InotifyInit1(unix.IN_CLOEXEC | unix.IN_NONBLOCK)
+ if fd == -1 {
+ return nil, errno
+ }
+
+ w := &Watcher{
+ fd: fd,
+ inotifyFile: os.NewFile(uintptr(fd), ""),
+ watches: make(map[string]*watch),
+ paths: make(map[int]string),
+ Events: make(chan Event),
+ Errors: make(chan error),
+ done: make(chan struct{}),
+ doneResp: make(chan struct{}),
+ }
+
+ go w.readEvents()
+ return w, nil
+}
+
+// Returns true if the event was sent, or false if watcher is closed.
+func (w *Watcher) sendEvent(e Event) bool {
+ select {
+ case w.Events <- e:
+ return true
+ case <-w.done:
+ }
+ return false
+}
+
+// Returns true if the error was sent, or false if watcher is closed.
+func (w *Watcher) sendError(err error) bool {
+ select {
+ case w.Errors <- err:
+ return true
+ case <-w.done:
+ return false
+ }
+}
+
+func (w *Watcher) isClosed() bool {
+ select {
+ case <-w.done:
+ return true
+ default:
+ return false
+ }
+}
+
+// Close removes all watches and closes the events channel.
+func (w *Watcher) Close() error {
+ w.mu.Lock()
+ if w.isClosed() {
+ w.mu.Unlock()
+ return nil
+ }
+
+ // Send 'close' signal to goroutine, and set the Watcher to closed.
+ close(w.done)
+ w.mu.Unlock()
+
+ // Causes any blocking reads to return with an error, provided the file
+ // still supports deadline operations.
+ err := w.inotifyFile.Close()
+ if err != nil {
+ return err
+ }
+
+ // Wait for goroutine to close
+ <-w.doneResp
+
+ return nil
+}
+
+// Add starts monitoring the path for changes.
+//
+// A path can only be watched once; attempting to watch it more than once will
+// return an error. Paths that do not yet exist on the filesystem cannot be
+// added. A watch will be automatically removed if the path is deleted.
+//
+// A path will remain watched if it gets renamed to somewhere else on the same
+// filesystem, but the monitor will get removed if the path gets deleted and
+// re-created, or if it's moved to a different filesystem.
+//
+// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special
+// filesystems (/proc, /sys, etc.) generally don't work.
+//
+// # Watching directories
+//
+// All files in a directory are monitored, including new files that are created
+// after the watcher is started. Subdirectories are not watched (i.e. it's
+// non-recursive).
+//
+// # Watching files
+//
+// Watching individual files (rather than directories) is generally not
+// recommended as many tools update files atomically. Instead of "just" writing
+// to the file a temporary file will be written to first, and if successful the
+// temporary file is moved to to destination removing the original, or some
+// variant thereof. The watcher on the original file is now lost, as it no
+// longer exists.
+//
+// Instead, watch the parent directory and use Event.Name to filter out files
+// you're not interested in. There is an example of this in [cmd/fsnotify/file.go].
+func (w *Watcher) Add(name string) error {
+ name = filepath.Clean(name)
+ if w.isClosed() {
+ return errors.New("inotify instance already closed")
+ }
+
+ var flags uint32 = unix.IN_MOVED_TO | unix.IN_MOVED_FROM |
+ unix.IN_CREATE | unix.IN_ATTRIB | unix.IN_MODIFY |
+ unix.IN_MOVE_SELF | unix.IN_DELETE | unix.IN_DELETE_SELF
+
+ w.mu.Lock()
+ defer w.mu.Unlock()
+ watchEntry := w.watches[name]
+ if watchEntry != nil {
+ flags |= watchEntry.flags | unix.IN_MASK_ADD
+ }
+ wd, errno := unix.InotifyAddWatch(w.fd, name, flags)
+ if wd == -1 {
+ return errno
+ }
+
+ if watchEntry == nil {
+ w.watches[name] = &watch{wd: uint32(wd), flags: flags}
+ w.paths[wd] = name
+ } else {
+ watchEntry.wd = uint32(wd)
+ watchEntry.flags = flags
+ }
+
+ return nil
+}
+
+// Remove stops monitoring the path for changes.
+//
+// Directories are always removed non-recursively. For example, if you added
+// /tmp/dir and /tmp/dir/subdir then you will need to remove both.
+//
+// Removing a path that has not yet been added returns [ErrNonExistentWatch].
+func (w *Watcher) Remove(name string) error {
+ name = filepath.Clean(name)
+
+ // Fetch the watch.
+ w.mu.Lock()
+ defer w.mu.Unlock()
+ watch, ok := w.watches[name]
+
+ // Remove it from inotify.
+ if !ok {
+ return fmt.Errorf("%w: %s", ErrNonExistentWatch, name)
+ }
+
+ // We successfully removed the watch if InotifyRmWatch doesn't return an
+ // error, we need to clean up our internal state to ensure it matches
+ // inotify's kernel state.
+ delete(w.paths, int(watch.wd))
+ delete(w.watches, name)
+
+ // inotify_rm_watch will return EINVAL if the file has been deleted;
+ // the inotify will already have been removed.
+ // watches and pathes are deleted in ignoreLinux() implicitly and asynchronously
+ // by calling inotify_rm_watch() below. e.g. readEvents() goroutine receives IN_IGNORE
+ // so that EINVAL means that the wd is being rm_watch()ed or its file removed
+ // by another thread and we have not received IN_IGNORE event.
+ success, errno := unix.InotifyRmWatch(w.fd, watch.wd)
+ if success == -1 {
+ // TODO: Perhaps it's not helpful to return an error here in every case;
+ // The only two possible errors are:
+ //
+ // - EBADF, which happens when w.fd is not a valid file descriptor
+ // of any kind.
+ // - EINVAL, which is when fd is not an inotify descriptor or wd
+ // is not a valid watch descriptor. Watch descriptors are
+ // invalidated when they are removed explicitly or implicitly;
+ // explicitly by inotify_rm_watch, implicitly when the file they
+ // are watching is deleted.
+ return errno
+ }
+
+ return nil
+}
+
+// WatchList returns all paths added with [Add] (and are not yet removed).
+func (w *Watcher) WatchList() []string {
+ w.mu.Lock()
+ defer w.mu.Unlock()
+
+ entries := make([]string, 0, len(w.watches))
+ for pathname := range w.watches {
+ entries = append(entries, pathname)
+ }
+
+ return entries
+}
+
+type watch struct {
+ wd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall)
+ flags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags)
+}
+
+// readEvents reads from the inotify file descriptor, converts the
+// received events into Event objects and sends them via the Events channel
+func (w *Watcher) readEvents() {
+ defer func() {
+ close(w.doneResp)
+ close(w.Errors)
+ close(w.Events)
+ }()
+
+ var (
+ buf [unix.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events
+ errno error // Syscall errno
+ )
+ for {
+ // See if we have been closed.
+ if w.isClosed() {
+ return
+ }
+
+ n, err := w.inotifyFile.Read(buf[:])
+ switch {
+ case errors.Unwrap(err) == os.ErrClosed:
+ return
+ case err != nil:
+ if !w.sendError(err) {
+ return
+ }
+ continue
+ }
+
+ if n < unix.SizeofInotifyEvent {
+ var err error
+ if n == 0 {
+ // If EOF is received. This should really never happen.
+ err = io.EOF
+ } else if n < 0 {
+ // If an error occurred while reading.
+ err = errno
+ } else {
+ // Read was too short.
+ err = errors.New("notify: short read in readEvents()")
+ }
+ if !w.sendError(err) {
+ return
+ }
+ continue
+ }
+
+ var offset uint32
+ // We don't know how many events we just read into the buffer
+ // While the offset points to at least one whole event...
+ for offset <= uint32(n-unix.SizeofInotifyEvent) {
+ var (
+ // Point "raw" to the event in the buffer
+ raw = (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset]))
+ mask = uint32(raw.Mask)
+ nameLen = uint32(raw.Len)
+ )
+
+ if mask&unix.IN_Q_OVERFLOW != 0 {
+ if !w.sendError(ErrEventOverflow) {
+ return
+ }
+ }
+
+ // If the event happened to the watched directory or the watched file, the kernel
+ // doesn't append the filename to the event, but we would like to always fill the
+ // the "Name" field with a valid filename. We retrieve the path of the watch from
+ // the "paths" map.
+ w.mu.Lock()
+ name, ok := w.paths[int(raw.Wd)]
+ // IN_DELETE_SELF occurs when the file/directory being watched is removed.
+ // This is a sign to clean up the maps, otherwise we are no longer in sync
+ // with the inotify kernel state which has already deleted the watch
+ // automatically.
+ if ok && mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF {
+ delete(w.paths, int(raw.Wd))
+ delete(w.watches, name)
+ }
+ w.mu.Unlock()
+
+ if nameLen > 0 {
+ // Point "bytes" at the first byte of the filename
+ bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent]))[:nameLen:nameLen]
+ // The filename is padded with NULL bytes. TrimRight() gets rid of those.
+ name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000")
+ }
+
+ event := w.newEvent(name, mask)
+
+ // Send the events that are not ignored on the events channel
+ if mask&unix.IN_IGNORED == 0 {
+ if !w.sendEvent(event) {
+ return
+ }
+ }
+
+ // Move to the next event in the buffer
+ offset += unix.SizeofInotifyEvent + nameLen
+ }
+ }
+}
+
+// newEvent returns an platform-independent Event based on an inotify mask.
+func (w *Watcher) newEvent(name string, mask uint32) Event {
+ e := Event{Name: name}
+ if mask&unix.IN_CREATE == unix.IN_CREATE || mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO {
+ e.Op |= Create
+ }
+ if mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF || mask&unix.IN_DELETE == unix.IN_DELETE {
+ e.Op |= Remove
+ }
+ if mask&unix.IN_MODIFY == unix.IN_MODIFY {
+ e.Op |= Write
+ }
+ if mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF || mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM {
+ e.Op |= Rename
+ }
+ if mask&unix.IN_ATTRIB == unix.IN_ATTRIB {
+ e.Op |= Chmod
+ }
+ return e
+}
diff --git a/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go b/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go
new file mode 100644
index 00000000..29087469
--- /dev/null
+++ b/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go
@@ -0,0 +1,707 @@
+//go:build freebsd || openbsd || netbsd || dragonfly || darwin
+// +build freebsd openbsd netbsd dragonfly darwin
+
+package fsnotify
+
+import (
+ "errors"
+ "fmt"
+ "io/ioutil"
+ "os"
+ "path/filepath"
+ "sync"
+
+ "golang.org/x/sys/unix"
+)
+
+// Watcher watches a set of paths, delivering events on a channel.
+//
+// A watcher should not be copied (e.g. pass it by pointer, rather than by
+// value).
+//
+// # Linux notes
+//
+// When a file is removed a Remove event won't be emitted until all file
+// descriptors are closed, and deletes will always emit a Chmod. For example:
+//
+// fp := os.Open("file")
+// os.Remove("file") // Triggers Chmod
+// fp.Close() // Triggers Remove
+//
+// This is the event that inotify sends, so not much can be changed about this.
+//
+// The fs.inotify.max_user_watches sysctl variable specifies the upper limit
+// for the number of watches per user, and fs.inotify.max_user_instances
+// specifies the maximum number of inotify instances per user. Every Watcher you
+// create is an "instance", and every path you add is a "watch".
+//
+// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and
+// /proc/sys/fs/inotify/max_user_instances
+//
+// To increase them you can use sysctl or write the value to the /proc file:
+//
+// # Default values on Linux 5.18
+// sysctl fs.inotify.max_user_watches=124983
+// sysctl fs.inotify.max_user_instances=128
+//
+// To make the changes persist on reboot edit /etc/sysctl.conf or
+// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check
+// your distro's documentation):
+//
+// fs.inotify.max_user_watches=124983
+// fs.inotify.max_user_instances=128
+//
+// Reaching the limit will result in a "no space left on device" or "too many open
+// files" error.
+//
+// # kqueue notes (macOS, BSD)
+//
+// kqueue requires opening a file descriptor for every file that's being watched;
+// so if you're watching a directory with five files then that's six file
+// descriptors. You will run in to your system's "max open files" limit faster on
+// these platforms.
+//
+// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to
+// control the maximum number of open files, as well as /etc/login.conf on BSD
+// systems.
+//
+// # macOS notes
+//
+// Spotlight indexing on macOS can result in multiple events (see [#15]). A
+// temporary workaround is to add your folder(s) to the "Spotlight Privacy
+// Settings" until we have a native FSEvents implementation (see [#11]).
+//
+// [#11]: https://github.com/fsnotify/fsnotify/issues/11
+// [#15]: https://github.com/fsnotify/fsnotify/issues/15
+type Watcher struct {
+ // Events sends the filesystem change events.
+ //
+ // fsnotify can send the following events; a "path" here can refer to a
+ // file, directory, symbolic link, or special file like a FIFO.
+ //
+ // fsnotify.Create A new path was created; this may be followed by one
+ // or more Write events if data also gets written to a
+ // file.
+ //
+ // fsnotify.Remove A path was removed.
+ //
+ // fsnotify.Rename A path was renamed. A rename is always sent with the
+ // old path as Event.Name, and a Create event will be
+ // sent with the new name. Renames are only sent for
+ // paths that are currently watched; e.g. moving an
+ // unmonitored file into a monitored directory will
+ // show up as just a Create. Similarly, renaming a file
+ // to outside a monitored directory will show up as
+ // only a Rename.
+ //
+ // fsnotify.Write A file or named pipe was written to. A Truncate will
+ // also trigger a Write. A single "write action"
+ // initiated by the user may show up as one or multiple
+ // writes, depending on when the system syncs things to
+ // disk. For example when compiling a large Go program
+ // you may get hundreds of Write events, so you
+ // probably want to wait until you've stopped receiving
+ // them (see the dedup example in cmd/fsnotify).
+ //
+ // fsnotify.Chmod Attributes were changed. On Linux this is also sent
+ // when a file is removed (or more accurately, when a
+ // link to an inode is removed). On kqueue it's sent
+ // and on kqueue when a file is truncated. On Windows
+ // it's never sent.
+ Events chan Event
+
+ // Errors sends any errors.
+ Errors chan error
+
+ done chan struct{}
+ kq int // File descriptor (as returned by the kqueue() syscall).
+ closepipe [2]int // Pipe used for closing.
+ mu sync.Mutex // Protects access to watcher data
+ watches map[string]int // Watched file descriptors (key: path).
+ watchesByDir map[string]map[int]struct{} // Watched file descriptors indexed by the parent directory (key: dirname(path)).
+ userWatches map[string]struct{} // Watches added with Watcher.Add()
+ dirFlags map[string]uint32 // Watched directories to fflags used in kqueue.
+ paths map[int]pathInfo // File descriptors to path names for processing kqueue events.
+ fileExists map[string]struct{} // Keep track of if we know this file exists (to stop duplicate create events).
+ isClosed bool // Set to true when Close() is first called
+}
+
+type pathInfo struct {
+ name string
+ isDir bool
+}
+
+// NewWatcher creates a new Watcher.
+func NewWatcher() (*Watcher, error) {
+ kq, closepipe, err := newKqueue()
+ if err != nil {
+ return nil, err
+ }
+
+ w := &Watcher{
+ kq: kq,
+ closepipe: closepipe,
+ watches: make(map[string]int),
+ watchesByDir: make(map[string]map[int]struct{}),
+ dirFlags: make(map[string]uint32),
+ paths: make(map[int]pathInfo),
+ fileExists: make(map[string]struct{}),
+ userWatches: make(map[string]struct{}),
+ Events: make(chan Event),
+ Errors: make(chan error),
+ done: make(chan struct{}),
+ }
+
+ go w.readEvents()
+ return w, nil
+}
+
+// newKqueue creates a new kernel event queue and returns a descriptor.
+//
+// This registers a new event on closepipe, which will trigger an event when
+// it's closed. This way we can use kevent() without timeout/polling; without
+// the closepipe, it would block forever and we wouldn't be able to stop it at
+// all.
+func newKqueue() (kq int, closepipe [2]int, err error) {
+ kq, err = unix.Kqueue()
+ if kq == -1 {
+ return kq, closepipe, err
+ }
+
+ // Register the close pipe.
+ err = unix.Pipe(closepipe[:])
+ if err != nil {
+ unix.Close(kq)
+ return kq, closepipe, err
+ }
+
+ // Register changes to listen on the closepipe.
+ changes := make([]unix.Kevent_t, 1)
+ // SetKevent converts int to the platform-specific types.
+ unix.SetKevent(&changes[0], closepipe[0], unix.EVFILT_READ,
+ unix.EV_ADD|unix.EV_ENABLE|unix.EV_ONESHOT)
+
+ ok, err := unix.Kevent(kq, changes, nil, nil)
+ if ok == -1 {
+ unix.Close(kq)
+ unix.Close(closepipe[0])
+ unix.Close(closepipe[1])
+ return kq, closepipe, err
+ }
+ return kq, closepipe, nil
+}
+
+// Returns true if the event was sent, or false if watcher is closed.
+func (w *Watcher) sendEvent(e Event) bool {
+ select {
+ case w.Events <- e:
+ return true
+ case <-w.done:
+ }
+ return false
+}
+
+// Returns true if the error was sent, or false if watcher is closed.
+func (w *Watcher) sendError(err error) bool {
+ select {
+ case w.Errors <- err:
+ return true
+ case <-w.done:
+ }
+ return false
+}
+
+// Close removes all watches and closes the events channel.
+func (w *Watcher) Close() error {
+ w.mu.Lock()
+ if w.isClosed {
+ w.mu.Unlock()
+ return nil
+ }
+ w.isClosed = true
+
+ // copy paths to remove while locked
+ pathsToRemove := make([]string, 0, len(w.watches))
+ for name := range w.watches {
+ pathsToRemove = append(pathsToRemove, name)
+ }
+ w.mu.Unlock() // Unlock before calling Remove, which also locks
+ for _, name := range pathsToRemove {
+ w.Remove(name)
+ }
+
+ // Send "quit" message to the reader goroutine.
+ unix.Close(w.closepipe[1])
+ close(w.done)
+
+ return nil
+}
+
+// Add starts monitoring the path for changes.
+//
+// A path can only be watched once; attempting to watch it more than once will
+// return an error. Paths that do not yet exist on the filesystem cannot be
+// added. A watch will be automatically removed if the path is deleted.
+//
+// A path will remain watched if it gets renamed to somewhere else on the same
+// filesystem, but the monitor will get removed if the path gets deleted and
+// re-created, or if it's moved to a different filesystem.
+//
+// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special
+// filesystems (/proc, /sys, etc.) generally don't work.
+//
+// # Watching directories
+//
+// All files in a directory are monitored, including new files that are created
+// after the watcher is started. Subdirectories are not watched (i.e. it's
+// non-recursive).
+//
+// # Watching files
+//
+// Watching individual files (rather than directories) is generally not
+// recommended as many tools update files atomically. Instead of "just" writing
+// to the file a temporary file will be written to first, and if successful the
+// temporary file is moved to to destination removing the original, or some
+// variant thereof. The watcher on the original file is now lost, as it no
+// longer exists.
+//
+// Instead, watch the parent directory and use Event.Name to filter out files
+// you're not interested in. There is an example of this in [cmd/fsnotify/file.go].
+func (w *Watcher) Add(name string) error {
+ w.mu.Lock()
+ w.userWatches[name] = struct{}{}
+ w.mu.Unlock()
+ _, err := w.addWatch(name, noteAllEvents)
+ return err
+}
+
+// Remove stops monitoring the path for changes.
+//
+// Directories are always removed non-recursively. For example, if you added
+// /tmp/dir and /tmp/dir/subdir then you will need to remove both.
+//
+// Removing a path that has not yet been added returns [ErrNonExistentWatch].
+func (w *Watcher) Remove(name string) error {
+ name = filepath.Clean(name)
+ w.mu.Lock()
+ watchfd, ok := w.watches[name]
+ w.mu.Unlock()
+ if !ok {
+ return fmt.Errorf("%w: %s", ErrNonExistentWatch, name)
+ }
+
+ err := w.register([]int{watchfd}, unix.EV_DELETE, 0)
+ if err != nil {
+ return err
+ }
+
+ unix.Close(watchfd)
+
+ w.mu.Lock()
+ isDir := w.paths[watchfd].isDir
+ delete(w.watches, name)
+ delete(w.userWatches, name)
+
+ parentName := filepath.Dir(name)
+ delete(w.watchesByDir[parentName], watchfd)
+
+ if len(w.watchesByDir[parentName]) == 0 {
+ delete(w.watchesByDir, parentName)
+ }
+
+ delete(w.paths, watchfd)
+ delete(w.dirFlags, name)
+ delete(w.fileExists, name)
+ w.mu.Unlock()
+
+ // Find all watched paths that are in this directory that are not external.
+ if isDir {
+ var pathsToRemove []string
+ w.mu.Lock()
+ for fd := range w.watchesByDir[name] {
+ path := w.paths[fd]
+ if _, ok := w.userWatches[path.name]; !ok {
+ pathsToRemove = append(pathsToRemove, path.name)
+ }
+ }
+ w.mu.Unlock()
+ for _, name := range pathsToRemove {
+ // Since these are internal, not much sense in propagating error
+ // to the user, as that will just confuse them with an error about
+ // a path they did not explicitly watch themselves.
+ w.Remove(name)
+ }
+ }
+
+ return nil
+}
+
+// WatchList returns all paths added with [Add] (and are not yet removed).
+func (w *Watcher) WatchList() []string {
+ w.mu.Lock()
+ defer w.mu.Unlock()
+
+ entries := make([]string, 0, len(w.userWatches))
+ for pathname := range w.userWatches {
+ entries = append(entries, pathname)
+ }
+
+ return entries
+}
+
+// Watch all events (except NOTE_EXTEND, NOTE_LINK, NOTE_REVOKE)
+const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | unix.NOTE_RENAME
+
+// addWatch adds name to the watched file set.
+// The flags are interpreted as described in kevent(2).
+// Returns the real path to the file which was added, if any, which may be different from the one passed in the case of symlinks.
+func (w *Watcher) addWatch(name string, flags uint32) (string, error) {
+ var isDir bool
+ // Make ./name and name equivalent
+ name = filepath.Clean(name)
+
+ w.mu.Lock()
+ if w.isClosed {
+ w.mu.Unlock()
+ return "", errors.New("kevent instance already closed")
+ }
+ watchfd, alreadyWatching := w.watches[name]
+ // We already have a watch, but we can still override flags.
+ if alreadyWatching {
+ isDir = w.paths[watchfd].isDir
+ }
+ w.mu.Unlock()
+
+ if !alreadyWatching {
+ fi, err := os.Lstat(name)
+ if err != nil {
+ return "", err
+ }
+
+ // Don't watch sockets or named pipes
+ if (fi.Mode()&os.ModeSocket == os.ModeSocket) || (fi.Mode()&os.ModeNamedPipe == os.ModeNamedPipe) {
+ return "", nil
+ }
+
+ // Follow Symlinks
+ //
+ // Linux can add unresolvable symlinks to the watch list without issue,
+ // and Windows can't do symlinks period. To maintain consistency, we
+ // will act like everything is fine if the link can't be resolved.
+ // There will simply be no file events for broken symlinks. Hence the
+ // returns of nil on errors.
+ if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
+ name, err = filepath.EvalSymlinks(name)
+ if err != nil {
+ return "", nil
+ }
+
+ w.mu.Lock()
+ _, alreadyWatching = w.watches[name]
+ w.mu.Unlock()
+
+ if alreadyWatching {
+ return name, nil
+ }
+
+ fi, err = os.Lstat(name)
+ if err != nil {
+ return "", nil
+ }
+ }
+
+ // Retry on EINTR; open() can return EINTR in practice on macOS.
+ // See #354, and go issues 11180 and 39237.
+ for {
+ watchfd, err = unix.Open(name, openMode, 0)
+ if err == nil {
+ break
+ }
+ if errors.Is(err, unix.EINTR) {
+ continue
+ }
+
+ return "", err
+ }
+
+ isDir = fi.IsDir()
+ }
+
+ err := w.register([]int{watchfd}, unix.EV_ADD|unix.EV_CLEAR|unix.EV_ENABLE, flags)
+ if err != nil {
+ unix.Close(watchfd)
+ return "", err
+ }
+
+ if !alreadyWatching {
+ w.mu.Lock()
+ parentName := filepath.Dir(name)
+ w.watches[name] = watchfd
+
+ watchesByDir, ok := w.watchesByDir[parentName]
+ if !ok {
+ watchesByDir = make(map[int]struct{}, 1)
+ w.watchesByDir[parentName] = watchesByDir
+ }
+ watchesByDir[watchfd] = struct{}{}
+
+ w.paths[watchfd] = pathInfo{name: name, isDir: isDir}
+ w.mu.Unlock()
+ }
+
+ if isDir {
+ // Watch the directory if it has not been watched before,
+ // or if it was watched before, but perhaps only a NOTE_DELETE (watchDirectoryFiles)
+ w.mu.Lock()
+
+ watchDir := (flags&unix.NOTE_WRITE) == unix.NOTE_WRITE &&
+ (!alreadyWatching || (w.dirFlags[name]&unix.NOTE_WRITE) != unix.NOTE_WRITE)
+ // Store flags so this watch can be updated later
+ w.dirFlags[name] = flags
+ w.mu.Unlock()
+
+ if watchDir {
+ if err := w.watchDirectoryFiles(name); err != nil {
+ return "", err
+ }
+ }
+ }
+ return name, nil
+}
+
+// readEvents reads from kqueue and converts the received kevents into
+// Event values that it sends down the Events channel.
+func (w *Watcher) readEvents() {
+ defer func() {
+ err := unix.Close(w.kq)
+ if err != nil {
+ w.Errors <- err
+ }
+ unix.Close(w.closepipe[0])
+ close(w.Events)
+ close(w.Errors)
+ }()
+
+ eventBuffer := make([]unix.Kevent_t, 10)
+ for closed := false; !closed; {
+ kevents, err := w.read(eventBuffer)
+ // EINTR is okay, the syscall was interrupted before timeout expired.
+ if err != nil && err != unix.EINTR {
+ if !w.sendError(fmt.Errorf("fsnotify.readEvents: %w", err)) {
+ closed = true
+ }
+ continue
+ }
+
+ // Flush the events we received to the Events channel
+ for _, kevent := range kevents {
+ var (
+ watchfd = int(kevent.Ident)
+ mask = uint32(kevent.Fflags)
+ )
+
+ // Shut down the loop when the pipe is closed, but only after all
+ // other events have been processed.
+ if watchfd == w.closepipe[0] {
+ closed = true
+ continue
+ }
+
+ w.mu.Lock()
+ path := w.paths[watchfd]
+ w.mu.Unlock()
+
+ event := w.newEvent(path.name, mask)
+
+ if path.isDir && !event.Has(Remove) {
+ // Double check to make sure the directory exists. This can
+ // happen when we do a rm -fr on a recursively watched folders
+ // and we receive a modification event first but the folder has
+ // been deleted and later receive the delete event.
+ if _, err := os.Lstat(event.Name); os.IsNotExist(err) {
+ event.Op |= Remove
+ }
+ }
+
+ if event.Has(Rename) || event.Has(Remove) {
+ w.Remove(event.Name)
+ w.mu.Lock()
+ delete(w.fileExists, event.Name)
+ w.mu.Unlock()
+ }
+
+ if path.isDir && event.Has(Write) && !event.Has(Remove) {
+ w.sendDirectoryChangeEvents(event.Name)
+ } else {
+ if !w.sendEvent(event) {
+ closed = true
+ continue
+ }
+ }
+
+ if event.Has(Remove) {
+ // Look for a file that may have overwritten this.
+ // For example, mv f1 f2 will delete f2, then create f2.
+ if path.isDir {
+ fileDir := filepath.Clean(event.Name)
+ w.mu.Lock()
+ _, found := w.watches[fileDir]
+ w.mu.Unlock()
+ if found {
+ // make sure the directory exists before we watch for changes. When we
+ // do a recursive watch and perform rm -fr, the parent directory might
+ // have gone missing, ignore the missing directory and let the
+ // upcoming delete event remove the watch from the parent directory.
+ if _, err := os.Lstat(fileDir); err == nil {
+ w.sendDirectoryChangeEvents(fileDir)
+ }
+ }
+ } else {
+ filePath := filepath.Clean(event.Name)
+ if fileInfo, err := os.Lstat(filePath); err == nil {
+ w.sendFileCreatedEventIfNew(filePath, fileInfo)
+ }
+ }
+ }
+ }
+ }
+}
+
+// newEvent returns an platform-independent Event based on kqueue Fflags.
+func (w *Watcher) newEvent(name string, mask uint32) Event {
+ e := Event{Name: name}
+ if mask&unix.NOTE_DELETE == unix.NOTE_DELETE {
+ e.Op |= Remove
+ }
+ if mask&unix.NOTE_WRITE == unix.NOTE_WRITE {
+ e.Op |= Write
+ }
+ if mask&unix.NOTE_RENAME == unix.NOTE_RENAME {
+ e.Op |= Rename
+ }
+ if mask&unix.NOTE_ATTRIB == unix.NOTE_ATTRIB {
+ e.Op |= Chmod
+ }
+ return e
+}
+
+// watchDirectoryFiles to mimic inotify when adding a watch on a directory
+func (w *Watcher) watchDirectoryFiles(dirPath string) error {
+ // Get all files
+ files, err := ioutil.ReadDir(dirPath)
+ if err != nil {
+ return err
+ }
+
+ for _, fileInfo := range files {
+ path := filepath.Join(dirPath, fileInfo.Name())
+
+ cleanPath, err := w.internalWatch(path, fileInfo)
+ if err != nil {
+ // No permission to read the file; that's not a problem: just skip.
+ // But do add it to w.fileExists to prevent it from being picked up
+ // as a "new" file later (it still shows up in the directory
+ // listing).
+ switch {
+ case errors.Is(err, unix.EACCES) || errors.Is(err, unix.EPERM):
+ cleanPath = filepath.Clean(path)
+ default:
+ return fmt.Errorf("%q: %w", filepath.Join(dirPath, fileInfo.Name()), err)
+ }
+ }
+
+ w.mu.Lock()
+ w.fileExists[cleanPath] = struct{}{}
+ w.mu.Unlock()
+ }
+
+ return nil
+}
+
+// Search the directory for new files and send an event for them.
+//
+// This functionality is to have the BSD watcher match the inotify, which sends
+// a create event for files created in a watched directory.
+func (w *Watcher) sendDirectoryChangeEvents(dir string) {
+ // Get all files
+ files, err := ioutil.ReadDir(dir)
+ if err != nil {
+ if !w.sendError(fmt.Errorf("fsnotify.sendDirectoryChangeEvents: %w", err)) {
+ return
+ }
+ }
+
+ // Search for new files
+ for _, fi := range files {
+ err := w.sendFileCreatedEventIfNew(filepath.Join(dir, fi.Name()), fi)
+ if err != nil {
+ return
+ }
+ }
+}
+
+// sendFileCreatedEvent sends a create event if the file isn't already being tracked.
+func (w *Watcher) sendFileCreatedEventIfNew(filePath string, fileInfo os.FileInfo) (err error) {
+ w.mu.Lock()
+ _, doesExist := w.fileExists[filePath]
+ w.mu.Unlock()
+ if !doesExist {
+ if !w.sendEvent(Event{Name: filePath, Op: Create}) {
+ return
+ }
+ }
+
+ // like watchDirectoryFiles (but without doing another ReadDir)
+ filePath, err = w.internalWatch(filePath, fileInfo)
+ if err != nil {
+ return err
+ }
+
+ w.mu.Lock()
+ w.fileExists[filePath] = struct{}{}
+ w.mu.Unlock()
+
+ return nil
+}
+
+func (w *Watcher) internalWatch(name string, fileInfo os.FileInfo) (string, error) {
+ if fileInfo.IsDir() {
+ // mimic Linux providing delete events for subdirectories
+ // but preserve the flags used if currently watching subdirectory
+ w.mu.Lock()
+ flags := w.dirFlags[name]
+ w.mu.Unlock()
+
+ flags |= unix.NOTE_DELETE | unix.NOTE_RENAME
+ return w.addWatch(name, flags)
+ }
+
+ // watch file to mimic Linux inotify
+ return w.addWatch(name, noteAllEvents)
+}
+
+// Register events with the queue.
+func (w *Watcher) register(fds []int, flags int, fflags uint32) error {
+ changes := make([]unix.Kevent_t, len(fds))
+ for i, fd := range fds {
+ // SetKevent converts int to the platform-specific types.
+ unix.SetKevent(&changes[i], fd, unix.EVFILT_VNODE, flags)
+ changes[i].Fflags = fflags
+ }
+
+ // Register the events.
+ success, err := unix.Kevent(w.kq, changes, nil, nil)
+ if success == -1 {
+ return err
+ }
+ return nil
+}
+
+// read retrieves pending events, or waits until an event occurs.
+func (w *Watcher) read(events []unix.Kevent_t) ([]unix.Kevent_t, error) {
+ n, err := unix.Kevent(w.kq, nil, events, nil)
+ if err != nil {
+ return nil, err
+ }
+ return events[0:n], nil
+}
diff --git a/vendor/github.com/fsnotify/fsnotify/backend_other.go b/vendor/github.com/fsnotify/fsnotify/backend_other.go
new file mode 100644
index 00000000..a9bb1c3c
--- /dev/null
+++ b/vendor/github.com/fsnotify/fsnotify/backend_other.go
@@ -0,0 +1,66 @@
+//go:build !darwin && !dragonfly && !freebsd && !openbsd && !linux && !netbsd && !solaris && !windows
+// +build !darwin,!dragonfly,!freebsd,!openbsd,!linux,!netbsd,!solaris,!windows
+
+package fsnotify
+
+import (
+ "fmt"
+ "runtime"
+)
+
+// Watcher watches a set of files, delivering events to a channel.
+type Watcher struct{}
+
+// NewWatcher creates a new Watcher.
+func NewWatcher() (*Watcher, error) {
+ return nil, fmt.Errorf("fsnotify not supported on %s", runtime.GOOS)
+}
+
+// Close removes all watches and closes the events channel.
+func (w *Watcher) Close() error {
+ return nil
+}
+
+// Add starts monitoring the path for changes.
+//
+// A path can only be watched once; attempting to watch it more than once will
+// return an error. Paths that do not yet exist on the filesystem cannot be
+// added. A watch will be automatically removed if the path is deleted.
+//
+// A path will remain watched if it gets renamed to somewhere else on the same
+// filesystem, but the monitor will get removed if the path gets deleted and
+// re-created, or if it's moved to a different filesystem.
+//
+// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special
+// filesystems (/proc, /sys, etc.) generally don't work.
+//
+// # Watching directories
+//
+// All files in a directory are monitored, including new files that are created
+// after the watcher is started. Subdirectories are not watched (i.e. it's
+// non-recursive).
+//
+// # Watching files
+//
+// Watching individual files (rather than directories) is generally not
+// recommended as many tools update files atomically. Instead of "just" writing
+// to the file a temporary file will be written to first, and if successful the
+// temporary file is moved to to destination removing the original, or some
+// variant thereof. The watcher on the original file is now lost, as it no
+// longer exists.
+//
+// Instead, watch the parent directory and use Event.Name to filter out files
+// you're not interested in. There is an example of this in [cmd/fsnotify/file.go].
+func (w *Watcher) Add(name string) error {
+ return nil
+}
+
+// Remove stops monitoring the path for changes.
+//
+// Directories are always removed non-recursively. For example, if you added
+// /tmp/dir and /tmp/dir/subdir then you will need to remove both.
+//
+// Removing a path that has not yet been added returns [ErrNonExistentWatch].
+func (w *Watcher) Remove(name string) error {
+ return nil
+}
diff --git a/vendor/github.com/fsnotify/fsnotify/backend_windows.go b/vendor/github.com/fsnotify/fsnotify/backend_windows.go
new file mode 100644
index 00000000..ae392867
--- /dev/null
+++ b/vendor/github.com/fsnotify/fsnotify/backend_windows.go
@@ -0,0 +1,746 @@
+//go:build windows
+// +build windows
+
+package fsnotify
+
+import (
+ "errors"
+ "fmt"
+ "os"
+ "path/filepath"
+ "reflect"
+ "runtime"
+ "strings"
+ "sync"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+// Watcher watches a set of paths, delivering events on a channel.
+//
+// A watcher should not be copied (e.g. pass it by pointer, rather than by
+// value).
+//
+// # Linux notes
+//
+// When a file is removed a Remove event won't be emitted until all file
+// descriptors are closed, and deletes will always emit a Chmod. For example:
+//
+// fp := os.Open("file")
+// os.Remove("file") // Triggers Chmod
+// fp.Close() // Triggers Remove
+//
+// This is the event that inotify sends, so not much can be changed about this.
+//
+// The fs.inotify.max_user_watches sysctl variable specifies the upper limit
+// for the number of watches per user, and fs.inotify.max_user_instances
+// specifies the maximum number of inotify instances per user. Every Watcher you
+// create is an "instance", and every path you add is a "watch".
+//
+// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and
+// /proc/sys/fs/inotify/max_user_instances
+//
+// To increase them you can use sysctl or write the value to the /proc file:
+//
+// # Default values on Linux 5.18
+// sysctl fs.inotify.max_user_watches=124983
+// sysctl fs.inotify.max_user_instances=128
+//
+// To make the changes persist on reboot edit /etc/sysctl.conf or
+// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check
+// your distro's documentation):
+//
+// fs.inotify.max_user_watches=124983
+// fs.inotify.max_user_instances=128
+//
+// Reaching the limit will result in a "no space left on device" or "too many open
+// files" error.
+//
+// # kqueue notes (macOS, BSD)
+//
+// kqueue requires opening a file descriptor for every file that's being watched;
+// so if you're watching a directory with five files then that's six file
+// descriptors. You will run in to your system's "max open files" limit faster on
+// these platforms.
+//
+// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to
+// control the maximum number of open files, as well as /etc/login.conf on BSD
+// systems.
+//
+// # macOS notes
+//
+// Spotlight indexing on macOS can result in multiple events (see [#15]). A
+// temporary workaround is to add your folder(s) to the "Spotlight Privacy
+// Settings" until we have a native FSEvents implementation (see [#11]).
+//
+// [#11]: https://github.com/fsnotify/fsnotify/issues/11
+// [#15]: https://github.com/fsnotify/fsnotify/issues/15
+type Watcher struct {
+ // Events sends the filesystem change events.
+ //
+ // fsnotify can send the following events; a "path" here can refer to a
+ // file, directory, symbolic link, or special file like a FIFO.
+ //
+ // fsnotify.Create A new path was created; this may be followed by one
+ // or more Write events if data also gets written to a
+ // file.
+ //
+ // fsnotify.Remove A path was removed.
+ //
+ // fsnotify.Rename A path was renamed. A rename is always sent with the
+ // old path as Event.Name, and a Create event will be
+ // sent with the new name. Renames are only sent for
+ // paths that are currently watched; e.g. moving an
+ // unmonitored file into a monitored directory will
+ // show up as just a Create. Similarly, renaming a file
+ // to outside a monitored directory will show up as
+ // only a Rename.
+ //
+ // fsnotify.Write A file or named pipe was written to. A Truncate will
+ // also trigger a Write. A single "write action"
+ // initiated by the user may show up as one or multiple
+ // writes, depending on when the system syncs things to
+ // disk. For example when compiling a large Go program
+ // you may get hundreds of Write events, so you
+ // probably want to wait until you've stopped receiving
+ // them (see the dedup example in cmd/fsnotify).
+ //
+ // fsnotify.Chmod Attributes were changed. On Linux this is also sent
+ // when a file is removed (or more accurately, when a
+ // link to an inode is removed). On kqueue it's sent
+ // and on kqueue when a file is truncated. On Windows
+ // it's never sent.
+ Events chan Event
+
+ // Errors sends any errors.
+ Errors chan error
+
+ port windows.Handle // Handle to completion port
+ input chan *input // Inputs to the reader are sent on this channel
+ quit chan chan<- error
+
+ mu sync.Mutex // Protects access to watches, isClosed
+ watches watchMap // Map of watches (key: i-number)
+ isClosed bool // Set to true when Close() is first called
+}
+
+// NewWatcher creates a new Watcher.
+func NewWatcher() (*Watcher, error) {
+ port, err := windows.CreateIoCompletionPort(windows.InvalidHandle, 0, 0, 0)
+ if err != nil {
+ return nil, os.NewSyscallError("CreateIoCompletionPort", err)
+ }
+ w := &Watcher{
+ port: port,
+ watches: make(watchMap),
+ input: make(chan *input, 1),
+ Events: make(chan Event, 50),
+ Errors: make(chan error),
+ quit: make(chan chan<- error, 1),
+ }
+ go w.readEvents()
+ return w, nil
+}
+
+func (w *Watcher) sendEvent(name string, mask uint64) bool {
+ if mask == 0 {
+ return false
+ }
+
+ event := w.newEvent(name, uint32(mask))
+ select {
+ case ch := <-w.quit:
+ w.quit <- ch
+ case w.Events <- event:
+ }
+ return true
+}
+
+// Returns true if the error was sent, or false if watcher is closed.
+func (w *Watcher) sendError(err error) bool {
+ select {
+ case w.Errors <- err:
+ return true
+ case <-w.quit:
+ }
+ return false
+}
+
+// Close removes all watches and closes the events channel.
+func (w *Watcher) Close() error {
+ w.mu.Lock()
+ if w.isClosed {
+ w.mu.Unlock()
+ return nil
+ }
+ w.isClosed = true
+ w.mu.Unlock()
+
+ // Send "quit" message to the reader goroutine
+ ch := make(chan error)
+ w.quit <- ch
+ if err := w.wakeupReader(); err != nil {
+ return err
+ }
+ return <-ch
+}
+
+// Add starts monitoring the path for changes.
+//
+// A path can only be watched once; attempting to watch it more than once will
+// return an error. Paths that do not yet exist on the filesystem cannot be
+// added. A watch will be automatically removed if the path is deleted.
+//
+// A path will remain watched if it gets renamed to somewhere else on the same
+// filesystem, but the monitor will get removed if the path gets deleted and
+// re-created, or if it's moved to a different filesystem.
+//
+// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special
+// filesystems (/proc, /sys, etc.) generally don't work.
+//
+// # Watching directories
+//
+// All files in a directory are monitored, including new files that are created
+// after the watcher is started. Subdirectories are not watched (i.e. it's
+// non-recursive).
+//
+// # Watching files
+//
+// Watching individual files (rather than directories) is generally not
+// recommended as many tools update files atomically. Instead of "just" writing
+// to the file a temporary file will be written to first, and if successful the
+// temporary file is moved to to destination removing the original, or some
+// variant thereof. The watcher on the original file is now lost, as it no
+// longer exists.
+//
+// Instead, watch the parent directory and use Event.Name to filter out files
+// you're not interested in. There is an example of this in [cmd/fsnotify/file.go].
+func (w *Watcher) Add(name string) error {
+ w.mu.Lock()
+ if w.isClosed {
+ w.mu.Unlock()
+ return errors.New("watcher already closed")
+ }
+ w.mu.Unlock()
+
+ in := &input{
+ op: opAddWatch,
+ path: filepath.Clean(name),
+ flags: sysFSALLEVENTS,
+ reply: make(chan error),
+ }
+ w.input <- in
+ if err := w.wakeupReader(); err != nil {
+ return err
+ }
+ return <-in.reply
+}
+
+// Remove stops monitoring the path for changes.
+//
+// Directories are always removed non-recursively. For example, if you added
+// /tmp/dir and /tmp/dir/subdir then you will need to remove both.
+//
+// Removing a path that has not yet been added returns [ErrNonExistentWatch].
+func (w *Watcher) Remove(name string) error {
+ in := &input{
+ op: opRemoveWatch,
+ path: filepath.Clean(name),
+ reply: make(chan error),
+ }
+ w.input <- in
+ if err := w.wakeupReader(); err != nil {
+ return err
+ }
+ return <-in.reply
+}
+
+// WatchList returns all paths added with [Add] (and are not yet removed).
+func (w *Watcher) WatchList() []string {
+ w.mu.Lock()
+ defer w.mu.Unlock()
+
+ entries := make([]string, 0, len(w.watches))
+ for _, entry := range w.watches {
+ for _, watchEntry := range entry {
+ entries = append(entries, watchEntry.path)
+ }
+ }
+
+ return entries
+}
+
+// These options are from the old golang.org/x/exp/winfsnotify, where you could
+// add various options to the watch. This has long since been removed.
+//
+// The "sys" in the name is misleading as they're not part of any "system".
+//
+// This should all be removed at some point, and just use windows.FILE_NOTIFY_*
+const (
+ sysFSALLEVENTS = 0xfff
+ sysFSATTRIB = 0x4
+ sysFSCREATE = 0x100
+ sysFSDELETE = 0x200
+ sysFSDELETESELF = 0x400
+ sysFSMODIFY = 0x2
+ sysFSMOVE = 0xc0
+ sysFSMOVEDFROM = 0x40
+ sysFSMOVEDTO = 0x80
+ sysFSMOVESELF = 0x800
+ sysFSIGNORED = 0x8000
+)
+
+func (w *Watcher) newEvent(name string, mask uint32) Event {
+ e := Event{Name: name}
+ if mask&sysFSCREATE == sysFSCREATE || mask&sysFSMOVEDTO == sysFSMOVEDTO {
+ e.Op |= Create
+ }
+ if mask&sysFSDELETE == sysFSDELETE || mask&sysFSDELETESELF == sysFSDELETESELF {
+ e.Op |= Remove
+ }
+ if mask&sysFSMODIFY == sysFSMODIFY {
+ e.Op |= Write
+ }
+ if mask&sysFSMOVE == sysFSMOVE || mask&sysFSMOVESELF == sysFSMOVESELF || mask&sysFSMOVEDFROM == sysFSMOVEDFROM {
+ e.Op |= Rename
+ }
+ if mask&sysFSATTRIB == sysFSATTRIB {
+ e.Op |= Chmod
+ }
+ return e
+}
+
+const (
+ opAddWatch = iota
+ opRemoveWatch
+)
+
+const (
+ provisional uint64 = 1 << (32 + iota)
+)
+
+type input struct {
+ op int
+ path string
+ flags uint32
+ reply chan error
+}
+
+type inode struct {
+ handle windows.Handle
+ volume uint32
+ index uint64
+}
+
+type watch struct {
+ ov windows.Overlapped
+ ino *inode // i-number
+ path string // Directory path
+ mask uint64 // Directory itself is being watched with these notify flags
+ names map[string]uint64 // Map of names being watched and their notify flags
+ rename string // Remembers the old name while renaming a file
+ buf [65536]byte // 64K buffer
+}
+
+type (
+ indexMap map[uint64]*watch
+ watchMap map[uint32]indexMap
+)
+
+func (w *Watcher) wakeupReader() error {
+ err := windows.PostQueuedCompletionStatus(w.port, 0, 0, nil)
+ if err != nil {
+ return os.NewSyscallError("PostQueuedCompletionStatus", err)
+ }
+ return nil
+}
+
+func (w *Watcher) getDir(pathname string) (dir string, err error) {
+ attr, err := windows.GetFileAttributes(windows.StringToUTF16Ptr(pathname))
+ if err != nil {
+ return "", os.NewSyscallError("GetFileAttributes", err)
+ }
+ if attr&windows.FILE_ATTRIBUTE_DIRECTORY != 0 {
+ dir = pathname
+ } else {
+ dir, _ = filepath.Split(pathname)
+ dir = filepath.Clean(dir)
+ }
+ return
+}
+
+func (w *Watcher) getIno(path string) (ino *inode, err error) {
+ h, err := windows.CreateFile(windows.StringToUTF16Ptr(path),
+ windows.FILE_LIST_DIRECTORY,
+ windows.FILE_SHARE_READ|windows.FILE_SHARE_WRITE|windows.FILE_SHARE_DELETE,
+ nil, windows.OPEN_EXISTING,
+ windows.FILE_FLAG_BACKUP_SEMANTICS|windows.FILE_FLAG_OVERLAPPED, 0)
+ if err != nil {
+ return nil, os.NewSyscallError("CreateFile", err)
+ }
+
+ var fi windows.ByHandleFileInformation
+ err = windows.GetFileInformationByHandle(h, &fi)
+ if err != nil {
+ windows.CloseHandle(h)
+ return nil, os.NewSyscallError("GetFileInformationByHandle", err)
+ }
+ ino = &inode{
+ handle: h,
+ volume: fi.VolumeSerialNumber,
+ index: uint64(fi.FileIndexHigh)<<32 | uint64(fi.FileIndexLow),
+ }
+ return ino, nil
+}
+
+// Must run within the I/O thread.
+func (m watchMap) get(ino *inode) *watch {
+ if i := m[ino.volume]; i != nil {
+ return i[ino.index]
+ }
+ return nil
+}
+
+// Must run within the I/O thread.
+func (m watchMap) set(ino *inode, watch *watch) {
+ i := m[ino.volume]
+ if i == nil {
+ i = make(indexMap)
+ m[ino.volume] = i
+ }
+ i[ino.index] = watch
+}
+
+// Must run within the I/O thread.
+func (w *Watcher) addWatch(pathname string, flags uint64) error {
+ dir, err := w.getDir(pathname)
+ if err != nil {
+ return err
+ }
+
+ ino, err := w.getIno(dir)
+ if err != nil {
+ return err
+ }
+ w.mu.Lock()
+ watchEntry := w.watches.get(ino)
+ w.mu.Unlock()
+ if watchEntry == nil {
+ _, err := windows.CreateIoCompletionPort(ino.handle, w.port, 0, 0)
+ if err != nil {
+ windows.CloseHandle(ino.handle)
+ return os.NewSyscallError("CreateIoCompletionPort", err)
+ }
+ watchEntry = &watch{
+ ino: ino,
+ path: dir,
+ names: make(map[string]uint64),
+ }
+ w.mu.Lock()
+ w.watches.set(ino, watchEntry)
+ w.mu.Unlock()
+ flags |= provisional
+ } else {
+ windows.CloseHandle(ino.handle)
+ }
+ if pathname == dir {
+ watchEntry.mask |= flags
+ } else {
+ watchEntry.names[filepath.Base(pathname)] |= flags
+ }
+
+ err = w.startRead(watchEntry)
+ if err != nil {
+ return err
+ }
+
+ if pathname == dir {
+ watchEntry.mask &= ^provisional
+ } else {
+ watchEntry.names[filepath.Base(pathname)] &= ^provisional
+ }
+ return nil
+}
+
+// Must run within the I/O thread.
+func (w *Watcher) remWatch(pathname string) error {
+ dir, err := w.getDir(pathname)
+ if err != nil {
+ return err
+ }
+ ino, err := w.getIno(dir)
+ if err != nil {
+ return err
+ }
+
+ w.mu.Lock()
+ watch := w.watches.get(ino)
+ w.mu.Unlock()
+
+ err = windows.CloseHandle(ino.handle)
+ if err != nil {
+ w.sendError(os.NewSyscallError("CloseHandle", err))
+ }
+ if watch == nil {
+ return fmt.Errorf("%w: %s", ErrNonExistentWatch, pathname)
+ }
+ if pathname == dir {
+ w.sendEvent(watch.path, watch.mask&sysFSIGNORED)
+ watch.mask = 0
+ } else {
+ name := filepath.Base(pathname)
+ w.sendEvent(filepath.Join(watch.path, name), watch.names[name]&sysFSIGNORED)
+ delete(watch.names, name)
+ }
+
+ return w.startRead(watch)
+}
+
+// Must run within the I/O thread.
+func (w *Watcher) deleteWatch(watch *watch) {
+ for name, mask := range watch.names {
+ if mask&provisional == 0 {
+ w.sendEvent(filepath.Join(watch.path, name), mask&sysFSIGNORED)
+ }
+ delete(watch.names, name)
+ }
+ if watch.mask != 0 {
+ if watch.mask&provisional == 0 {
+ w.sendEvent(watch.path, watch.mask&sysFSIGNORED)
+ }
+ watch.mask = 0
+ }
+}
+
+// Must run within the I/O thread.
+func (w *Watcher) startRead(watch *watch) error {
+ err := windows.CancelIo(watch.ino.handle)
+ if err != nil {
+ w.sendError(os.NewSyscallError("CancelIo", err))
+ w.deleteWatch(watch)
+ }
+ mask := w.toWindowsFlags(watch.mask)
+ for _, m := range watch.names {
+ mask |= w.toWindowsFlags(m)
+ }
+ if mask == 0 {
+ err := windows.CloseHandle(watch.ino.handle)
+ if err != nil {
+ w.sendError(os.NewSyscallError("CloseHandle", err))
+ }
+ w.mu.Lock()
+ delete(w.watches[watch.ino.volume], watch.ino.index)
+ w.mu.Unlock()
+ return nil
+ }
+
+ rdErr := windows.ReadDirectoryChanges(watch.ino.handle, &watch.buf[0],
+ uint32(unsafe.Sizeof(watch.buf)), false, mask, nil, &watch.ov, 0)
+ if rdErr != nil {
+ err := os.NewSyscallError("ReadDirectoryChanges", rdErr)
+ if rdErr == windows.ERROR_ACCESS_DENIED && watch.mask&provisional == 0 {
+ // Watched directory was probably removed
+ w.sendEvent(watch.path, watch.mask&sysFSDELETESELF)
+ err = nil
+ }
+ w.deleteWatch(watch)
+ w.startRead(watch)
+ return err
+ }
+ return nil
+}
+
+// readEvents reads from the I/O completion port, converts the
+// received events into Event objects and sends them via the Events channel.
+// Entry point to the I/O thread.
+func (w *Watcher) readEvents() {
+ var (
+ n uint32
+ key uintptr
+ ov *windows.Overlapped
+ )
+ runtime.LockOSThread()
+
+ for {
+ qErr := windows.GetQueuedCompletionStatus(w.port, &n, &key, &ov, windows.INFINITE)
+ // This error is handled after the watch == nil check below. NOTE: this
+ // seems odd, note sure if it's correct.
+
+ watch := (*watch)(unsafe.Pointer(ov))
+ if watch == nil {
+ select {
+ case ch := <-w.quit:
+ w.mu.Lock()
+ var indexes []indexMap
+ for _, index := range w.watches {
+ indexes = append(indexes, index)
+ }
+ w.mu.Unlock()
+ for _, index := range indexes {
+ for _, watch := range index {
+ w.deleteWatch(watch)
+ w.startRead(watch)
+ }
+ }
+
+ err := windows.CloseHandle(w.port)
+ if err != nil {
+ err = os.NewSyscallError("CloseHandle", err)
+ }
+ close(w.Events)
+ close(w.Errors)
+ ch <- err
+ return
+ case in := <-w.input:
+ switch in.op {
+ case opAddWatch:
+ in.reply <- w.addWatch(in.path, uint64(in.flags))
+ case opRemoveWatch:
+ in.reply <- w.remWatch(in.path)
+ }
+ default:
+ }
+ continue
+ }
+
+ switch qErr {
+ case windows.ERROR_MORE_DATA:
+ if watch == nil {
+ w.sendError(errors.New("ERROR_MORE_DATA has unexpectedly null lpOverlapped buffer"))
+ } else {
+ // The i/o succeeded but the buffer is full.
+ // In theory we should be building up a full packet.
+ // In practice we can get away with just carrying on.
+ n = uint32(unsafe.Sizeof(watch.buf))
+ }
+ case windows.ERROR_ACCESS_DENIED:
+ // Watched directory was probably removed
+ w.sendEvent(watch.path, watch.mask&sysFSDELETESELF)
+ w.deleteWatch(watch)
+ w.startRead(watch)
+ continue
+ case windows.ERROR_OPERATION_ABORTED:
+ // CancelIo was called on this handle
+ continue
+ default:
+ w.sendError(os.NewSyscallError("GetQueuedCompletionPort", qErr))
+ continue
+ case nil:
+ }
+
+ var offset uint32
+ for {
+ if n == 0 {
+ w.sendError(errors.New("short read in readEvents()"))
+ break
+ }
+
+ // Point "raw" to the event in the buffer
+ raw := (*windows.FileNotifyInformation)(unsafe.Pointer(&watch.buf[offset]))
+
+ // Create a buf that is the size of the path name
+ size := int(raw.FileNameLength / 2)
+ var buf []uint16
+ // TODO: Use unsafe.Slice in Go 1.17; https://stackoverflow.com/questions/51187973
+ sh := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
+ sh.Data = uintptr(unsafe.Pointer(&raw.FileName))
+ sh.Len = size
+ sh.Cap = size
+ name := windows.UTF16ToString(buf)
+ fullname := filepath.Join(watch.path, name)
+
+ var mask uint64
+ switch raw.Action {
+ case windows.FILE_ACTION_REMOVED:
+ mask = sysFSDELETESELF
+ case windows.FILE_ACTION_MODIFIED:
+ mask = sysFSMODIFY
+ case windows.FILE_ACTION_RENAMED_OLD_NAME:
+ watch.rename = name
+ case windows.FILE_ACTION_RENAMED_NEW_NAME:
+ // Update saved path of all sub-watches.
+ old := filepath.Join(watch.path, watch.rename)
+ w.mu.Lock()
+ for _, watchMap := range w.watches {
+ for _, ww := range watchMap {
+ if strings.HasPrefix(ww.path, old) {
+ ww.path = filepath.Join(fullname, strings.TrimPrefix(ww.path, old))
+ }
+ }
+ }
+ w.mu.Unlock()
+
+ if watch.names[watch.rename] != 0 {
+ watch.names[name] |= watch.names[watch.rename]
+ delete(watch.names, watch.rename)
+ mask = sysFSMOVESELF
+ }
+ }
+
+ sendNameEvent := func() {
+ w.sendEvent(fullname, watch.names[name]&mask)
+ }
+ if raw.Action != windows.FILE_ACTION_RENAMED_NEW_NAME {
+ sendNameEvent()
+ }
+ if raw.Action == windows.FILE_ACTION_REMOVED {
+ w.sendEvent(fullname, watch.names[name]&sysFSIGNORED)
+ delete(watch.names, name)
+ }
+
+ w.sendEvent(fullname, watch.mask&w.toFSnotifyFlags(raw.Action))
+ if raw.Action == windows.FILE_ACTION_RENAMED_NEW_NAME {
+ fullname = filepath.Join(watch.path, watch.rename)
+ sendNameEvent()
+ }
+
+ // Move to the next event in the buffer
+ if raw.NextEntryOffset == 0 {
+ break
+ }
+ offset += raw.NextEntryOffset
+
+ // Error!
+ if offset >= n {
+ w.sendError(errors.New(
+ "Windows system assumed buffer larger than it is, events have likely been missed."))
+ break
+ }
+ }
+
+ if err := w.startRead(watch); err != nil {
+ w.sendError(err)
+ }
+ }
+}
+
+func (w *Watcher) toWindowsFlags(mask uint64) uint32 {
+ var m uint32
+ if mask&sysFSMODIFY != 0 {
+ m |= windows.FILE_NOTIFY_CHANGE_LAST_WRITE
+ }
+ if mask&sysFSATTRIB != 0 {
+ m |= windows.FILE_NOTIFY_CHANGE_ATTRIBUTES
+ }
+ if mask&(sysFSMOVE|sysFSCREATE|sysFSDELETE) != 0 {
+ m |= windows.FILE_NOTIFY_CHANGE_FILE_NAME | windows.FILE_NOTIFY_CHANGE_DIR_NAME
+ }
+ return m
+}
+
+func (w *Watcher) toFSnotifyFlags(action uint32) uint64 {
+ switch action {
+ case windows.FILE_ACTION_ADDED:
+ return sysFSCREATE
+ case windows.FILE_ACTION_REMOVED:
+ return sysFSDELETE
+ case windows.FILE_ACTION_MODIFIED:
+ return sysFSMODIFY
+ case windows.FILE_ACTION_RENAMED_OLD_NAME:
+ return sysFSMOVEDFROM
+ case windows.FILE_ACTION_RENAMED_NEW_NAME:
+ return sysFSMOVEDTO
+ }
+ return 0
+}
diff --git a/vendor/github.com/fsnotify/fsnotify/fen.go b/vendor/github.com/fsnotify/fsnotify/fen.go
deleted file mode 100644
index b3ac3d8f..00000000
--- a/vendor/github.com/fsnotify/fsnotify/fen.go
+++ /dev/null
@@ -1,38 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build solaris
-// +build solaris
-
-package fsnotify
-
-import (
- "errors"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- return nil, errors.New("FEN based watcher not yet supported for fsnotify\n")
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- return nil
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- return nil
-}
-
-// Remove stops watching the the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- return nil
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify.go b/vendor/github.com/fsnotify/fsnotify/fsnotify.go
index 0f4ee52e..30a5bf0f 100644
--- a/vendor/github.com/fsnotify/fsnotify/fsnotify.go
+++ b/vendor/github.com/fsnotify/fsnotify/fsnotify.go
@@ -1,29 +1,37 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
//go:build !plan9
// +build !plan9
-// Package fsnotify provides a platform-independent interface for file system notifications.
+// Package fsnotify provides a cross-platform interface for file system
+// notifications.
package fsnotify
import (
- "bytes"
"errors"
"fmt"
+ "strings"
)
-// Event represents a single file system notification.
+// Event represents a file system notification.
type Event struct {
- Name string // Relative path to the file or directory.
- Op Op // File operation that triggered the event.
+ // Path to the file or directory.
+ //
+ // Paths are relative to the input; for example with Add("dir") the Name
+ // will be set to "dir/file" if you create that file, but if you use
+ // Add("/path/to/dir") it will be "/path/to/dir/file".
+ Name string
+
+ // File operation that triggered the event.
+ //
+ // This is a bitmask and some systems may send multiple operations at once.
+ // Use the Event.Has() method instead of comparing with ==.
+ Op Op
}
// Op describes a set of file operations.
type Op uint32
-// These are the generalized file operations that can trigger a notification.
+// The operations fsnotify can trigger; see the documentation on [Watcher] for a
+// full description, and check them with [Event.Has].
const (
Create Op = 1 << iota
Write
@@ -32,38 +40,42 @@ const (
Chmod
)
-func (op Op) String() string {
- // Use a buffer for efficient string concatenation
- var buffer bytes.Buffer
+// Common errors that can be reported by a watcher
+var (
+ ErrNonExistentWatch = errors.New("can't remove non-existent watcher")
+ ErrEventOverflow = errors.New("fsnotify queue overflow")
+)
- if op&Create == Create {
- buffer.WriteString("|CREATE")
+func (op Op) String() string {
+ var b strings.Builder
+ if op.Has(Create) {
+ b.WriteString("|CREATE")
}
- if op&Remove == Remove {
- buffer.WriteString("|REMOVE")
+ if op.Has(Remove) {
+ b.WriteString("|REMOVE")
}
- if op&Write == Write {
- buffer.WriteString("|WRITE")
+ if op.Has(Write) {
+ b.WriteString("|WRITE")
}
- if op&Rename == Rename {
- buffer.WriteString("|RENAME")
+ if op.Has(Rename) {
+ b.WriteString("|RENAME")
}
- if op&Chmod == Chmod {
- buffer.WriteString("|CHMOD")
+ if op.Has(Chmod) {
+ b.WriteString("|CHMOD")
}
- if buffer.Len() == 0 {
- return ""
+ if b.Len() == 0 {
+ return "[no events]"
}
- return buffer.String()[1:] // Strip leading pipe
+ return b.String()[1:]
}
-// String returns a string representation of the event in the form
-// "file: REMOVE|WRITE|..."
+// Has reports if this operation has the given operation.
+func (o Op) Has(h Op) bool { return o&h == h }
+
+// Has reports if this event has the given operation.
+func (e Event) Has(op Op) bool { return e.Op.Has(op) }
+
+// String returns a string representation of the event with their path.
func (e Event) String() string {
- return fmt.Sprintf("%q: %s", e.Name, e.Op.String())
+ return fmt.Sprintf("%-13s %q", e.Op.String(), e.Name)
}
-
-// Common errors that can be reported by a watcher
-var (
- ErrEventOverflow = errors.New("fsnotify queue overflow")
-)
diff --git a/vendor/github.com/fsnotify/fsnotify/fsnotify_unsupported.go b/vendor/github.com/fsnotify/fsnotify/fsnotify_unsupported.go
deleted file mode 100644
index 59688559..00000000
--- a/vendor/github.com/fsnotify/fsnotify/fsnotify_unsupported.go
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright 2022 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build !darwin && !dragonfly && !freebsd && !openbsd && !linux && !netbsd && !solaris && !windows
-// +build !darwin,!dragonfly,!freebsd,!openbsd,!linux,!netbsd,!solaris,!windows
-
-package fsnotify
-
-import (
- "fmt"
- "runtime"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct{}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- return nil, fmt.Errorf("fsnotify not supported on %s", runtime.GOOS)
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- return nil
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- return nil
-}
-
-// Remove stops watching the the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- return nil
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/inotify.go b/vendor/github.com/fsnotify/fsnotify/inotify.go
deleted file mode 100644
index a6d0e0ec..00000000
--- a/vendor/github.com/fsnotify/fsnotify/inotify.go
+++ /dev/null
@@ -1,351 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build linux
-// +build linux
-
-package fsnotify
-
-import (
- "errors"
- "fmt"
- "io"
- "os"
- "path/filepath"
- "strings"
- "sync"
- "unsafe"
-
- "golang.org/x/sys/unix"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
- mu sync.Mutex // Map access
- fd int
- poller *fdPoller
- watches map[string]*watch // Map of inotify watches (key: path)
- paths map[int]string // Map of watched paths (key: watch descriptor)
- done chan struct{} // Channel for sending a "quit message" to the reader goroutine
- doneResp chan struct{} // Channel to respond to Close
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- // Create inotify fd
- fd, errno := unix.InotifyInit1(unix.IN_CLOEXEC)
- if fd == -1 {
- return nil, errno
- }
- // Create epoll
- poller, err := newFdPoller(fd)
- if err != nil {
- unix.Close(fd)
- return nil, err
- }
- w := &Watcher{
- fd: fd,
- poller: poller,
- watches: make(map[string]*watch),
- paths: make(map[int]string),
- Events: make(chan Event),
- Errors: make(chan error),
- done: make(chan struct{}),
- doneResp: make(chan struct{}),
- }
-
- go w.readEvents()
- return w, nil
-}
-
-func (w *Watcher) isClosed() bool {
- select {
- case <-w.done:
- return true
- default:
- return false
- }
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- if w.isClosed() {
- return nil
- }
-
- // Send 'close' signal to goroutine, and set the Watcher to closed.
- close(w.done)
-
- // Wake up goroutine
- w.poller.wake()
-
- // Wait for goroutine to close
- <-w.doneResp
-
- return nil
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- name = filepath.Clean(name)
- if w.isClosed() {
- return errors.New("inotify instance already closed")
- }
-
- const agnosticEvents = unix.IN_MOVED_TO | unix.IN_MOVED_FROM |
- unix.IN_CREATE | unix.IN_ATTRIB | unix.IN_MODIFY |
- unix.IN_MOVE_SELF | unix.IN_DELETE | unix.IN_DELETE_SELF
-
- var flags uint32 = agnosticEvents
-
- w.mu.Lock()
- defer w.mu.Unlock()
- watchEntry := w.watches[name]
- if watchEntry != nil {
- flags |= watchEntry.flags | unix.IN_MASK_ADD
- }
- wd, errno := unix.InotifyAddWatch(w.fd, name, flags)
- if wd == -1 {
- return errno
- }
-
- if watchEntry == nil {
- w.watches[name] = &watch{wd: uint32(wd), flags: flags}
- w.paths[wd] = name
- } else {
- watchEntry.wd = uint32(wd)
- watchEntry.flags = flags
- }
-
- return nil
-}
-
-// Remove stops watching the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- name = filepath.Clean(name)
-
- // Fetch the watch.
- w.mu.Lock()
- defer w.mu.Unlock()
- watch, ok := w.watches[name]
-
- // Remove it from inotify.
- if !ok {
- return fmt.Errorf("can't remove non-existent inotify watch for: %s", name)
- }
-
- // We successfully removed the watch if InotifyRmWatch doesn't return an
- // error, we need to clean up our internal state to ensure it matches
- // inotify's kernel state.
- delete(w.paths, int(watch.wd))
- delete(w.watches, name)
-
- // inotify_rm_watch will return EINVAL if the file has been deleted;
- // the inotify will already have been removed.
- // watches and pathes are deleted in ignoreLinux() implicitly and asynchronously
- // by calling inotify_rm_watch() below. e.g. readEvents() goroutine receives IN_IGNORE
- // so that EINVAL means that the wd is being rm_watch()ed or its file removed
- // by another thread and we have not received IN_IGNORE event.
- success, errno := unix.InotifyRmWatch(w.fd, watch.wd)
- if success == -1 {
- // TODO: Perhaps it's not helpful to return an error here in every case.
- // the only two possible errors are:
- // EBADF, which happens when w.fd is not a valid file descriptor of any kind.
- // EINVAL, which is when fd is not an inotify descriptor or wd is not a valid watch descriptor.
- // Watch descriptors are invalidated when they are removed explicitly or implicitly;
- // explicitly by inotify_rm_watch, implicitly when the file they are watching is deleted.
- return errno
- }
-
- return nil
-}
-
-// WatchList returns the directories and files that are being monitered.
-func (w *Watcher) WatchList() []string {
- w.mu.Lock()
- defer w.mu.Unlock()
-
- entries := make([]string, 0, len(w.watches))
- for pathname := range w.watches {
- entries = append(entries, pathname)
- }
-
- return entries
-}
-
-type watch struct {
- wd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall)
- flags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags)
-}
-
-// readEvents reads from the inotify file descriptor, converts the
-// received events into Event objects and sends them via the Events channel
-func (w *Watcher) readEvents() {
- var (
- buf [unix.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events
- n int // Number of bytes read with read()
- errno error // Syscall errno
- ok bool // For poller.wait
- )
-
- defer close(w.doneResp)
- defer close(w.Errors)
- defer close(w.Events)
- defer unix.Close(w.fd)
- defer w.poller.close()
-
- for {
- // See if we have been closed.
- if w.isClosed() {
- return
- }
-
- ok, errno = w.poller.wait()
- if errno != nil {
- select {
- case w.Errors <- errno:
- case <-w.done:
- return
- }
- continue
- }
-
- if !ok {
- continue
- }
-
- n, errno = unix.Read(w.fd, buf[:])
- // If a signal interrupted execution, see if we've been asked to close, and try again.
- // http://man7.org/linux/man-pages/man7/signal.7.html :
- // "Before Linux 3.8, reads from an inotify(7) file descriptor were not restartable"
- if errno == unix.EINTR {
- continue
- }
-
- // unix.Read might have been woken up by Close. If so, we're done.
- if w.isClosed() {
- return
- }
-
- if n < unix.SizeofInotifyEvent {
- var err error
- if n == 0 {
- // If EOF is received. This should really never happen.
- err = io.EOF
- } else if n < 0 {
- // If an error occurred while reading.
- err = errno
- } else {
- // Read was too short.
- err = errors.New("notify: short read in readEvents()")
- }
- select {
- case w.Errors <- err:
- case <-w.done:
- return
- }
- continue
- }
-
- var offset uint32
- // We don't know how many events we just read into the buffer
- // While the offset points to at least one whole event...
- for offset <= uint32(n-unix.SizeofInotifyEvent) {
- // Point "raw" to the event in the buffer
- raw := (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset]))
-
- mask := uint32(raw.Mask)
- nameLen := uint32(raw.Len)
-
- if mask&unix.IN_Q_OVERFLOW != 0 {
- select {
- case w.Errors <- ErrEventOverflow:
- case <-w.done:
- return
- }
- }
-
- // If the event happened to the watched directory or the watched file, the kernel
- // doesn't append the filename to the event, but we would like to always fill the
- // the "Name" field with a valid filename. We retrieve the path of the watch from
- // the "paths" map.
- w.mu.Lock()
- name, ok := w.paths[int(raw.Wd)]
- // IN_DELETE_SELF occurs when the file/directory being watched is removed.
- // This is a sign to clean up the maps, otherwise we are no longer in sync
- // with the inotify kernel state which has already deleted the watch
- // automatically.
- if ok && mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF {
- delete(w.paths, int(raw.Wd))
- delete(w.watches, name)
- }
- w.mu.Unlock()
-
- if nameLen > 0 {
- // Point "bytes" at the first byte of the filename
- bytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent]))[:nameLen:nameLen]
- // The filename is padded with NULL bytes. TrimRight() gets rid of those.
- name += "/" + strings.TrimRight(string(bytes[0:nameLen]), "\000")
- }
-
- event := newEvent(name, mask)
-
- // Send the events that are not ignored on the events channel
- if !event.ignoreLinux(mask) {
- select {
- case w.Events <- event:
- case <-w.done:
- return
- }
- }
-
- // Move to the next event in the buffer
- offset += unix.SizeofInotifyEvent + nameLen
- }
- }
-}
-
-// Certain types of events can be "ignored" and not sent over the Events
-// channel. Such as events marked ignore by the kernel, or MODIFY events
-// against files that do not exist.
-func (e *Event) ignoreLinux(mask uint32) bool {
- // Ignore anything the inotify API says to ignore
- if mask&unix.IN_IGNORED == unix.IN_IGNORED {
- return true
- }
-
- // If the event is not a DELETE or RENAME, the file must exist.
- // Otherwise the event is ignored.
- // *Note*: this was put in place because it was seen that a MODIFY
- // event was sent after the DELETE. This ignores that MODIFY and
- // assumes a DELETE will come or has come if the file doesn't exist.
- if !(e.Op&Remove == Remove || e.Op&Rename == Rename) {
- _, statErr := os.Lstat(e.Name)
- return os.IsNotExist(statErr)
- }
- return false
-}
-
-// newEvent returns an platform-independent Event based on an inotify mask.
-func newEvent(name string, mask uint32) Event {
- e := Event{Name: name}
- if mask&unix.IN_CREATE == unix.IN_CREATE || mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO {
- e.Op |= Create
- }
- if mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF || mask&unix.IN_DELETE == unix.IN_DELETE {
- e.Op |= Remove
- }
- if mask&unix.IN_MODIFY == unix.IN_MODIFY {
- e.Op |= Write
- }
- if mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF || mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM {
- e.Op |= Rename
- }
- if mask&unix.IN_ATTRIB == unix.IN_ATTRIB {
- e.Op |= Chmod
- }
- return e
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/inotify_poller.go b/vendor/github.com/fsnotify/fsnotify/inotify_poller.go
deleted file mode 100644
index b572a37c..00000000
--- a/vendor/github.com/fsnotify/fsnotify/inotify_poller.go
+++ /dev/null
@@ -1,187 +0,0 @@
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build linux
-// +build linux
-
-package fsnotify
-
-import (
- "errors"
-
- "golang.org/x/sys/unix"
-)
-
-type fdPoller struct {
- fd int // File descriptor (as returned by the inotify_init() syscall)
- epfd int // Epoll file descriptor
- pipe [2]int // Pipe for waking up
-}
-
-func emptyPoller(fd int) *fdPoller {
- poller := new(fdPoller)
- poller.fd = fd
- poller.epfd = -1
- poller.pipe[0] = -1
- poller.pipe[1] = -1
- return poller
-}
-
-// Create a new inotify poller.
-// This creates an inotify handler, and an epoll handler.
-func newFdPoller(fd int) (*fdPoller, error) {
- var errno error
- poller := emptyPoller(fd)
- defer func() {
- if errno != nil {
- poller.close()
- }
- }()
-
- // Create epoll fd
- poller.epfd, errno = unix.EpollCreate1(unix.EPOLL_CLOEXEC)
- if poller.epfd == -1 {
- return nil, errno
- }
- // Create pipe; pipe[0] is the read end, pipe[1] the write end.
- errno = unix.Pipe2(poller.pipe[:], unix.O_NONBLOCK|unix.O_CLOEXEC)
- if errno != nil {
- return nil, errno
- }
-
- // Register inotify fd with epoll
- event := unix.EpollEvent{
- Fd: int32(poller.fd),
- Events: unix.EPOLLIN,
- }
- errno = unix.EpollCtl(poller.epfd, unix.EPOLL_CTL_ADD, poller.fd, &event)
- if errno != nil {
- return nil, errno
- }
-
- // Register pipe fd with epoll
- event = unix.EpollEvent{
- Fd: int32(poller.pipe[0]),
- Events: unix.EPOLLIN,
- }
- errno = unix.EpollCtl(poller.epfd, unix.EPOLL_CTL_ADD, poller.pipe[0], &event)
- if errno != nil {
- return nil, errno
- }
-
- return poller, nil
-}
-
-// Wait using epoll.
-// Returns true if something is ready to be read,
-// false if there is not.
-func (poller *fdPoller) wait() (bool, error) {
- // 3 possible events per fd, and 2 fds, makes a maximum of 6 events.
- // I don't know whether epoll_wait returns the number of events returned,
- // or the total number of events ready.
- // I decided to catch both by making the buffer one larger than the maximum.
- events := make([]unix.EpollEvent, 7)
- for {
- n, errno := unix.EpollWait(poller.epfd, events, -1)
- if n == -1 {
- if errno == unix.EINTR {
- continue
- }
- return false, errno
- }
- if n == 0 {
- // If there are no events, try again.
- continue
- }
- if n > 6 {
- // This should never happen. More events were returned than should be possible.
- return false, errors.New("epoll_wait returned more events than I know what to do with")
- }
- ready := events[:n]
- epollhup := false
- epollerr := false
- epollin := false
- for _, event := range ready {
- if event.Fd == int32(poller.fd) {
- if event.Events&unix.EPOLLHUP != 0 {
- // This should not happen, but if it does, treat it as a wakeup.
- epollhup = true
- }
- if event.Events&unix.EPOLLERR != 0 {
- // If an error is waiting on the file descriptor, we should pretend
- // something is ready to read, and let unix.Read pick up the error.
- epollerr = true
- }
- if event.Events&unix.EPOLLIN != 0 {
- // There is data to read.
- epollin = true
- }
- }
- if event.Fd == int32(poller.pipe[0]) {
- if event.Events&unix.EPOLLHUP != 0 {
- // Write pipe descriptor was closed, by us. This means we're closing down the
- // watcher, and we should wake up.
- }
- if event.Events&unix.EPOLLERR != 0 {
- // If an error is waiting on the pipe file descriptor.
- // This is an absolute mystery, and should never ever happen.
- return false, errors.New("Error on the pipe descriptor.")
- }
- if event.Events&unix.EPOLLIN != 0 {
- // This is a regular wakeup, so we have to clear the buffer.
- err := poller.clearWake()
- if err != nil {
- return false, err
- }
- }
- }
- }
-
- if epollhup || epollerr || epollin {
- return true, nil
- }
- return false, nil
- }
-}
-
-// Close the write end of the poller.
-func (poller *fdPoller) wake() error {
- buf := make([]byte, 1)
- n, errno := unix.Write(poller.pipe[1], buf)
- if n == -1 {
- if errno == unix.EAGAIN {
- // Buffer is full, poller will wake.
- return nil
- }
- return errno
- }
- return nil
-}
-
-func (poller *fdPoller) clearWake() error {
- // You have to be woken up a LOT in order to get to 100!
- buf := make([]byte, 100)
- n, errno := unix.Read(poller.pipe[0], buf)
- if n == -1 {
- if errno == unix.EAGAIN {
- // Buffer is empty, someone else cleared our wake.
- return nil
- }
- return errno
- }
- return nil
-}
-
-// Close all poller file descriptors, but not the one passed to it.
-func (poller *fdPoller) close() {
- if poller.pipe[1] != -1 {
- unix.Close(poller.pipe[1])
- }
- if poller.pipe[0] != -1 {
- unix.Close(poller.pipe[0])
- }
- if poller.epfd != -1 {
- unix.Close(poller.epfd)
- }
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/kqueue.go b/vendor/github.com/fsnotify/fsnotify/kqueue.go
deleted file mode 100644
index 6fb8d853..00000000
--- a/vendor/github.com/fsnotify/fsnotify/kqueue.go
+++ /dev/null
@@ -1,535 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build freebsd || openbsd || netbsd || dragonfly || darwin
-// +build freebsd openbsd netbsd dragonfly darwin
-
-package fsnotify
-
-import (
- "errors"
- "fmt"
- "io/ioutil"
- "os"
- "path/filepath"
- "sync"
- "time"
-
- "golang.org/x/sys/unix"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
- done chan struct{} // Channel for sending a "quit message" to the reader goroutine
-
- kq int // File descriptor (as returned by the kqueue() syscall).
-
- mu sync.Mutex // Protects access to watcher data
- watches map[string]int // Map of watched file descriptors (key: path).
- externalWatches map[string]bool // Map of watches added by user of the library.
- dirFlags map[string]uint32 // Map of watched directories to fflags used in kqueue.
- paths map[int]pathInfo // Map file descriptors to path names for processing kqueue events.
- fileExists map[string]bool // Keep track of if we know this file exists (to stop duplicate create events).
- isClosed bool // Set to true when Close() is first called
-}
-
-type pathInfo struct {
- name string
- isDir bool
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- kq, err := kqueue()
- if err != nil {
- return nil, err
- }
-
- w := &Watcher{
- kq: kq,
- watches: make(map[string]int),
- dirFlags: make(map[string]uint32),
- paths: make(map[int]pathInfo),
- fileExists: make(map[string]bool),
- externalWatches: make(map[string]bool),
- Events: make(chan Event),
- Errors: make(chan error),
- done: make(chan struct{}),
- }
-
- go w.readEvents()
- return w, nil
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- w.mu.Lock()
- if w.isClosed {
- w.mu.Unlock()
- return nil
- }
- w.isClosed = true
-
- // copy paths to remove while locked
- var pathsToRemove = make([]string, 0, len(w.watches))
- for name := range w.watches {
- pathsToRemove = append(pathsToRemove, name)
- }
- w.mu.Unlock()
- // unlock before calling Remove, which also locks
-
- for _, name := range pathsToRemove {
- w.Remove(name)
- }
-
- // send a "quit" message to the reader goroutine
- close(w.done)
-
- return nil
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- w.mu.Lock()
- w.externalWatches[name] = true
- w.mu.Unlock()
- _, err := w.addWatch(name, noteAllEvents)
- return err
-}
-
-// Remove stops watching the the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- name = filepath.Clean(name)
- w.mu.Lock()
- watchfd, ok := w.watches[name]
- w.mu.Unlock()
- if !ok {
- return fmt.Errorf("can't remove non-existent kevent watch for: %s", name)
- }
-
- const registerRemove = unix.EV_DELETE
- if err := register(w.kq, []int{watchfd}, registerRemove, 0); err != nil {
- return err
- }
-
- unix.Close(watchfd)
-
- w.mu.Lock()
- isDir := w.paths[watchfd].isDir
- delete(w.watches, name)
- delete(w.paths, watchfd)
- delete(w.dirFlags, name)
- w.mu.Unlock()
-
- // Find all watched paths that are in this directory that are not external.
- if isDir {
- var pathsToRemove []string
- w.mu.Lock()
- for _, path := range w.paths {
- wdir, _ := filepath.Split(path.name)
- if filepath.Clean(wdir) == name {
- if !w.externalWatches[path.name] {
- pathsToRemove = append(pathsToRemove, path.name)
- }
- }
- }
- w.mu.Unlock()
- for _, name := range pathsToRemove {
- // Since these are internal, not much sense in propagating error
- // to the user, as that will just confuse them with an error about
- // a path they did not explicitly watch themselves.
- w.Remove(name)
- }
- }
-
- return nil
-}
-
-// WatchList returns the directories and files that are being monitered.
-func (w *Watcher) WatchList() []string {
- w.mu.Lock()
- defer w.mu.Unlock()
-
- entries := make([]string, 0, len(w.watches))
- for pathname := range w.watches {
- entries = append(entries, pathname)
- }
-
- return entries
-}
-
-// Watch all events (except NOTE_EXTEND, NOTE_LINK, NOTE_REVOKE)
-const noteAllEvents = unix.NOTE_DELETE | unix.NOTE_WRITE | unix.NOTE_ATTRIB | unix.NOTE_RENAME
-
-// keventWaitTime to block on each read from kevent
-var keventWaitTime = durationToTimespec(100 * time.Millisecond)
-
-// addWatch adds name to the watched file set.
-// The flags are interpreted as described in kevent(2).
-// Returns the real path to the file which was added, if any, which may be different from the one passed in the case of symlinks.
-func (w *Watcher) addWatch(name string, flags uint32) (string, error) {
- var isDir bool
- // Make ./name and name equivalent
- name = filepath.Clean(name)
-
- w.mu.Lock()
- if w.isClosed {
- w.mu.Unlock()
- return "", errors.New("kevent instance already closed")
- }
- watchfd, alreadyWatching := w.watches[name]
- // We already have a watch, but we can still override flags.
- if alreadyWatching {
- isDir = w.paths[watchfd].isDir
- }
- w.mu.Unlock()
-
- if !alreadyWatching {
- fi, err := os.Lstat(name)
- if err != nil {
- return "", err
- }
-
- // Don't watch sockets.
- if fi.Mode()&os.ModeSocket == os.ModeSocket {
- return "", nil
- }
-
- // Don't watch named pipes.
- if fi.Mode()&os.ModeNamedPipe == os.ModeNamedPipe {
- return "", nil
- }
-
- // Follow Symlinks
- // Unfortunately, Linux can add bogus symlinks to watch list without
- // issue, and Windows can't do symlinks period (AFAIK). To maintain
- // consistency, we will act like everything is fine. There will simply
- // be no file events for broken symlinks.
- // Hence the returns of nil on errors.
- if fi.Mode()&os.ModeSymlink == os.ModeSymlink {
- name, err = filepath.EvalSymlinks(name)
- if err != nil {
- return "", nil
- }
-
- w.mu.Lock()
- _, alreadyWatching = w.watches[name]
- w.mu.Unlock()
-
- if alreadyWatching {
- return name, nil
- }
-
- fi, err = os.Lstat(name)
- if err != nil {
- return "", nil
- }
- }
-
- watchfd, err = unix.Open(name, openMode, 0700)
- if watchfd == -1 {
- return "", err
- }
-
- isDir = fi.IsDir()
- }
-
- const registerAdd = unix.EV_ADD | unix.EV_CLEAR | unix.EV_ENABLE
- if err := register(w.kq, []int{watchfd}, registerAdd, flags); err != nil {
- unix.Close(watchfd)
- return "", err
- }
-
- if !alreadyWatching {
- w.mu.Lock()
- w.watches[name] = watchfd
- w.paths[watchfd] = pathInfo{name: name, isDir: isDir}
- w.mu.Unlock()
- }
-
- if isDir {
- // Watch the directory if it has not been watched before,
- // or if it was watched before, but perhaps only a NOTE_DELETE (watchDirectoryFiles)
- w.mu.Lock()
-
- watchDir := (flags&unix.NOTE_WRITE) == unix.NOTE_WRITE &&
- (!alreadyWatching || (w.dirFlags[name]&unix.NOTE_WRITE) != unix.NOTE_WRITE)
- // Store flags so this watch can be updated later
- w.dirFlags[name] = flags
- w.mu.Unlock()
-
- if watchDir {
- if err := w.watchDirectoryFiles(name); err != nil {
- return "", err
- }
- }
- }
- return name, nil
-}
-
-// readEvents reads from kqueue and converts the received kevents into
-// Event values that it sends down the Events channel.
-func (w *Watcher) readEvents() {
- eventBuffer := make([]unix.Kevent_t, 10)
-
-loop:
- for {
- // See if there is a message on the "done" channel
- select {
- case <-w.done:
- break loop
- default:
- }
-
- // Get new events
- kevents, err := read(w.kq, eventBuffer, &keventWaitTime)
- // EINTR is okay, the syscall was interrupted before timeout expired.
- if err != nil && err != unix.EINTR {
- select {
- case w.Errors <- err:
- case <-w.done:
- break loop
- }
- continue
- }
-
- // Flush the events we received to the Events channel
- for len(kevents) > 0 {
- kevent := &kevents[0]
- watchfd := int(kevent.Ident)
- mask := uint32(kevent.Fflags)
- w.mu.Lock()
- path := w.paths[watchfd]
- w.mu.Unlock()
- event := newEvent(path.name, mask)
-
- if path.isDir && !(event.Op&Remove == Remove) {
- // Double check to make sure the directory exists. This can happen when
- // we do a rm -fr on a recursively watched folders and we receive a
- // modification event first but the folder has been deleted and later
- // receive the delete event
- if _, err := os.Lstat(event.Name); os.IsNotExist(err) {
- // mark is as delete event
- event.Op |= Remove
- }
- }
-
- if event.Op&Rename == Rename || event.Op&Remove == Remove {
- w.Remove(event.Name)
- w.mu.Lock()
- delete(w.fileExists, event.Name)
- w.mu.Unlock()
- }
-
- if path.isDir && event.Op&Write == Write && !(event.Op&Remove == Remove) {
- w.sendDirectoryChangeEvents(event.Name)
- } else {
- // Send the event on the Events channel.
- select {
- case w.Events <- event:
- case <-w.done:
- break loop
- }
- }
-
- if event.Op&Remove == Remove {
- // Look for a file that may have overwritten this.
- // For example, mv f1 f2 will delete f2, then create f2.
- if path.isDir {
- fileDir := filepath.Clean(event.Name)
- w.mu.Lock()
- _, found := w.watches[fileDir]
- w.mu.Unlock()
- if found {
- // make sure the directory exists before we watch for changes. When we
- // do a recursive watch and perform rm -fr, the parent directory might
- // have gone missing, ignore the missing directory and let the
- // upcoming delete event remove the watch from the parent directory.
- if _, err := os.Lstat(fileDir); err == nil {
- w.sendDirectoryChangeEvents(fileDir)
- }
- }
- } else {
- filePath := filepath.Clean(event.Name)
- if fileInfo, err := os.Lstat(filePath); err == nil {
- w.sendFileCreatedEventIfNew(filePath, fileInfo)
- }
- }
- }
-
- // Move to next event
- kevents = kevents[1:]
- }
- }
-
- // cleanup
- err := unix.Close(w.kq)
- if err != nil {
- // only way the previous loop breaks is if w.done was closed so we need to async send to w.Errors.
- select {
- case w.Errors <- err:
- default:
- }
- }
- close(w.Events)
- close(w.Errors)
-}
-
-// newEvent returns an platform-independent Event based on kqueue Fflags.
-func newEvent(name string, mask uint32) Event {
- e := Event{Name: name}
- if mask&unix.NOTE_DELETE == unix.NOTE_DELETE {
- e.Op |= Remove
- }
- if mask&unix.NOTE_WRITE == unix.NOTE_WRITE {
- e.Op |= Write
- }
- if mask&unix.NOTE_RENAME == unix.NOTE_RENAME {
- e.Op |= Rename
- }
- if mask&unix.NOTE_ATTRIB == unix.NOTE_ATTRIB {
- e.Op |= Chmod
- }
- return e
-}
-
-func newCreateEvent(name string) Event {
- return Event{Name: name, Op: Create}
-}
-
-// watchDirectoryFiles to mimic inotify when adding a watch on a directory
-func (w *Watcher) watchDirectoryFiles(dirPath string) error {
- // Get all files
- files, err := ioutil.ReadDir(dirPath)
- if err != nil {
- return err
- }
-
- for _, fileInfo := range files {
- filePath := filepath.Join(dirPath, fileInfo.Name())
- filePath, err = w.internalWatch(filePath, fileInfo)
- if err != nil {
- return err
- }
-
- w.mu.Lock()
- w.fileExists[filePath] = true
- w.mu.Unlock()
- }
-
- return nil
-}
-
-// sendDirectoryEvents searches the directory for newly created files
-// and sends them over the event channel. This functionality is to have
-// the BSD version of fsnotify match Linux inotify which provides a
-// create event for files created in a watched directory.
-func (w *Watcher) sendDirectoryChangeEvents(dirPath string) {
- // Get all files
- files, err := ioutil.ReadDir(dirPath)
- if err != nil {
- select {
- case w.Errors <- err:
- case <-w.done:
- return
- }
- }
-
- // Search for new files
- for _, fileInfo := range files {
- filePath := filepath.Join(dirPath, fileInfo.Name())
- err := w.sendFileCreatedEventIfNew(filePath, fileInfo)
-
- if err != nil {
- return
- }
- }
-}
-
-// sendFileCreatedEvent sends a create event if the file isn't already being tracked.
-func (w *Watcher) sendFileCreatedEventIfNew(filePath string, fileInfo os.FileInfo) (err error) {
- w.mu.Lock()
- _, doesExist := w.fileExists[filePath]
- w.mu.Unlock()
- if !doesExist {
- // Send create event
- select {
- case w.Events <- newCreateEvent(filePath):
- case <-w.done:
- return
- }
- }
-
- // like watchDirectoryFiles (but without doing another ReadDir)
- filePath, err = w.internalWatch(filePath, fileInfo)
- if err != nil {
- return err
- }
-
- w.mu.Lock()
- w.fileExists[filePath] = true
- w.mu.Unlock()
-
- return nil
-}
-
-func (w *Watcher) internalWatch(name string, fileInfo os.FileInfo) (string, error) {
- if fileInfo.IsDir() {
- // mimic Linux providing delete events for subdirectories
- // but preserve the flags used if currently watching subdirectory
- w.mu.Lock()
- flags := w.dirFlags[name]
- w.mu.Unlock()
-
- flags |= unix.NOTE_DELETE | unix.NOTE_RENAME
- return w.addWatch(name, flags)
- }
-
- // watch file to mimic Linux inotify
- return w.addWatch(name, noteAllEvents)
-}
-
-// kqueue creates a new kernel event queue and returns a descriptor.
-func kqueue() (kq int, err error) {
- kq, err = unix.Kqueue()
- if kq == -1 {
- return kq, err
- }
- return kq, nil
-}
-
-// register events with the queue
-func register(kq int, fds []int, flags int, fflags uint32) error {
- changes := make([]unix.Kevent_t, len(fds))
-
- for i, fd := range fds {
- // SetKevent converts int to the platform-specific types:
- unix.SetKevent(&changes[i], fd, unix.EVFILT_VNODE, flags)
- changes[i].Fflags = fflags
- }
-
- // register the events
- success, err := unix.Kevent(kq, changes, nil, nil)
- if success == -1 {
- return err
- }
- return nil
-}
-
-// read retrieves pending events, or waits until an event occurs.
-// A timeout of nil blocks indefinitely, while 0 polls the queue.
-func read(kq int, events []unix.Kevent_t, timeout *unix.Timespec) ([]unix.Kevent_t, error) {
- n, err := unix.Kevent(kq, nil, events, timeout)
- if err != nil {
- return nil, err
- }
- return events[0:n], nil
-}
-
-// durationToTimespec prepares a timeout value
-func durationToTimespec(d time.Duration) unix.Timespec {
- return unix.NsecToTimespec(d.Nanoseconds())
-}
diff --git a/vendor/github.com/fsnotify/fsnotify/mkdoc.zsh b/vendor/github.com/fsnotify/fsnotify/mkdoc.zsh
new file mode 100644
index 00000000..b09ef768
--- /dev/null
+++ b/vendor/github.com/fsnotify/fsnotify/mkdoc.zsh
@@ -0,0 +1,208 @@
+#!/usr/bin/env zsh
+[ "${ZSH_VERSION:-}" = "" ] && echo >&2 "Only works with zsh" && exit 1
+setopt err_exit no_unset pipefail extended_glob
+
+# Simple script to update the godoc comments on all watchers. Probably took me
+# more time to write this than doing it manually, but ah well 🙃
+
+watcher=$(<<EOF
+// Watcher watches a set of paths, delivering events on a channel.
+//
+// A watcher should not be copied (e.g. pass it by pointer, rather than by
+// value).
+//
+// # Linux notes
+//
+// When a file is removed a Remove event won't be emitted until all file
+// descriptors are closed, and deletes will always emit a Chmod. For example:
+//
+// fp := os.Open("file")
+// os.Remove("file") // Triggers Chmod
+// fp.Close() // Triggers Remove
+//
+// This is the event that inotify sends, so not much can be changed about this.
+//
+// The fs.inotify.max_user_watches sysctl variable specifies the upper limit
+// for the number of watches per user, and fs.inotify.max_user_instances
+// specifies the maximum number of inotify instances per user. Every Watcher you
+// create is an "instance", and every path you add is a "watch".
+//
+// These are also exposed in /proc as /proc/sys/fs/inotify/max_user_watches and
+// /proc/sys/fs/inotify/max_user_instances
+//
+// To increase them you can use sysctl or write the value to the /proc file:
+//
+// # Default values on Linux 5.18
+// sysctl fs.inotify.max_user_watches=124983
+// sysctl fs.inotify.max_user_instances=128
+//
+// To make the changes persist on reboot edit /etc/sysctl.conf or
+// /usr/lib/sysctl.d/50-default.conf (details differ per Linux distro; check
+// your distro's documentation):
+//
+// fs.inotify.max_user_watches=124983
+// fs.inotify.max_user_instances=128
+//
+// Reaching the limit will result in a "no space left on device" or "too many open
+// files" error.
+//
+// # kqueue notes (macOS, BSD)
+//
+// kqueue requires opening a file descriptor for every file that's being watched;
+// so if you're watching a directory with five files then that's six file
+// descriptors. You will run in to your system's "max open files" limit faster on
+// these platforms.
+//
+// The sysctl variables kern.maxfiles and kern.maxfilesperproc can be used to
+// control the maximum number of open files, as well as /etc/login.conf on BSD
+// systems.
+//
+// # macOS notes
+//
+// Spotlight indexing on macOS can result in multiple events (see [#15]). A
+// temporary workaround is to add your folder(s) to the "Spotlight Privacy
+// Settings" until we have a native FSEvents implementation (see [#11]).
+//
+// [#11]: https://github.com/fsnotify/fsnotify/issues/11
+// [#15]: https://github.com/fsnotify/fsnotify/issues/15
+EOF
+)
+
+new=$(<<EOF
+// NewWatcher creates a new Watcher.
+EOF
+)
+
+add=$(<<EOF
+// Add starts monitoring the path for changes.
+//
+// A path can only be watched once; attempting to watch it more than once will
+// return an error. Paths that do not yet exist on the filesystem cannot be
+// added. A watch will be automatically removed if the path is deleted.
+//
+// A path will remain watched if it gets renamed to somewhere else on the same
+// filesystem, but the monitor will get removed if the path gets deleted and
+// re-created, or if it's moved to a different filesystem.
+//
+// Notifications on network filesystems (NFS, SMB, FUSE, etc.) or special
+// filesystems (/proc, /sys, etc.) generally don't work.
+//
+// # Watching directories
+//
+// All files in a directory are monitored, including new files that are created
+// after the watcher is started. Subdirectories are not watched (i.e. it's
+// non-recursive).
+//
+// # Watching files
+//
+// Watching individual files (rather than directories) is generally not
+// recommended as many tools update files atomically. Instead of "just" writing
+// to the file a temporary file will be written to first, and if successful the
+// temporary file is moved to to destination removing the original, or some
+// variant thereof. The watcher on the original file is now lost, as it no
+// longer exists.
+//
+// Instead, watch the parent directory and use Event.Name to filter out files
+// you're not interested in. There is an example of this in [cmd/fsnotify/file.go].
+EOF
+)
+
+remove=$(<<EOF
+// Remove stops monitoring the path for changes.
+//
+// Directories are always removed non-recursively. For example, if you added
+// /tmp/dir and /tmp/dir/subdir then you will need to remove both.
+//
+// Removing a path that has not yet been added returns [ErrNonExistentWatch].
+EOF
+)
+
+close=$(<<EOF
+// Close removes all watches and closes the events channel.
+EOF
+)
+
+watchlist=$(<<EOF
+// WatchList returns all paths added with [Add] (and are not yet removed).
+EOF
+)
+
+events=$(<<EOF
+ // Events sends the filesystem change events.
+ //
+ // fsnotify can send the following events; a "path" here can refer to a
+ // file, directory, symbolic link, or special file like a FIFO.
+ //
+ // fsnotify.Create A new path was created; this may be followed by one
+ // or more Write events if data also gets written to a
+ // file.
+ //
+ // fsnotify.Remove A path was removed.
+ //
+ // fsnotify.Rename A path was renamed. A rename is always sent with the
+ // old path as Event.Name, and a Create event will be
+ // sent with the new name. Renames are only sent for
+ // paths that are currently watched; e.g. moving an
+ // unmonitored file into a monitored directory will
+ // show up as just a Create. Similarly, renaming a file
+ // to outside a monitored directory will show up as
+ // only a Rename.
+ //
+ // fsnotify.Write A file or named pipe was written to. A Truncate will
+ // also trigger a Write. A single "write action"
+ // initiated by the user may show up as one or multiple
+ // writes, depending on when the system syncs things to
+ // disk. For example when compiling a large Go program
+ // you may get hundreds of Write events, so you
+ // probably want to wait until you've stopped receiving
+ // them (see the dedup example in cmd/fsnotify).
+ //
+ // fsnotify.Chmod Attributes were changed. On Linux this is also sent
+ // when a file is removed (or more accurately, when a
+ // link to an inode is removed). On kqueue it's sent
+ // and on kqueue when a file is truncated. On Windows
+ // it's never sent.
+EOF
+)
+
+errors=$(<<EOF
+ // Errors sends any errors.
+EOF
+)
+
+set-cmt() {
+ local pat=$1
+ local cmt=$2
+
+ IFS=$'\n' local files=($(grep -n $pat backend_*~*_test.go))
+ for f in $files; do
+ IFS=':' local fields=($=f)
+ local file=$fields[1]
+ local end=$(( $fields[2] - 1 ))
+
+ # Find start of comment.
+ local start=0
+ IFS=$'\n' local lines=($(head -n$end $file))
+ for (( i = 1; i <= $#lines; i++ )); do
+ local line=$lines[-$i]
+ if ! grep -q '^[[:space:]]*//' <<<$line; then
+ start=$(( end - (i - 2) ))
+ break
+ fi
+ done
+
+ head -n $(( start - 1 )) $file >/tmp/x
+ print -r -- $cmt >>/tmp/x
+ tail -n+$(( end + 1 )) $file >>/tmp/x
+ mv /tmp/x $file
+ done
+}
+
+set-cmt '^type Watcher struct ' $watcher
+set-cmt '^func NewWatcher(' $new
+set-cmt '^func (w \*Watcher) Add(' $add
+set-cmt '^func (w \*Watcher) Remove(' $remove
+set-cmt '^func (w \*Watcher) Close(' $close
+set-cmt '^func (w \*Watcher) WatchList(' $watchlist
+set-cmt '^[[:space:]]*Events *chan Event$' $events
+set-cmt '^[[:space:]]*Errors *chan error$' $errors
diff --git a/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go b/vendor/github.com/fsnotify/fsnotify/system_bsd.go
index 36cc3845..4322b0b8 100644
--- a/vendor/github.com/fsnotify/fsnotify/open_mode_bsd.go
+++ b/vendor/github.com/fsnotify/fsnotify/system_bsd.go
@@ -1,7 +1,3 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
//go:build freebsd || openbsd || netbsd || dragonfly
// +build freebsd openbsd netbsd dragonfly
diff --git a/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go b/vendor/github.com/fsnotify/fsnotify/system_darwin.go
index 98cd8476..5da5ffa7 100644
--- a/vendor/github.com/fsnotify/fsnotify/open_mode_darwin.go
+++ b/vendor/github.com/fsnotify/fsnotify/system_darwin.go
@@ -1,7 +1,3 @@
-// Copyright 2013 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
//go:build darwin
// +build darwin
diff --git a/vendor/github.com/fsnotify/fsnotify/windows.go b/vendor/github.com/fsnotify/fsnotify/windows.go
deleted file mode 100644
index 02ce7deb..00000000
--- a/vendor/github.com/fsnotify/fsnotify/windows.go
+++ /dev/null
@@ -1,586 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-//go:build windows
-// +build windows
-
-package fsnotify
-
-import (
- "errors"
- "fmt"
- "os"
- "path/filepath"
- "reflect"
- "runtime"
- "sync"
- "syscall"
- "unsafe"
-)
-
-// Watcher watches a set of files, delivering events to a channel.
-type Watcher struct {
- Events chan Event
- Errors chan error
- isClosed bool // Set to true when Close() is first called
- mu sync.Mutex // Map access
- port syscall.Handle // Handle to completion port
- watches watchMap // Map of watches (key: i-number)
- input chan *input // Inputs to the reader are sent on this channel
- quit chan chan<- error
-}
-
-// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.
-func NewWatcher() (*Watcher, error) {
- port, e := syscall.CreateIoCompletionPort(syscall.InvalidHandle, 0, 0, 0)
- if e != nil {
- return nil, os.NewSyscallError("CreateIoCompletionPort", e)
- }
- w := &Watcher{
- port: port,
- watches: make(watchMap),
- input: make(chan *input, 1),
- Events: make(chan Event, 50),
- Errors: make(chan error),
- quit: make(chan chan<- error, 1),
- }
- go w.readEvents()
- return w, nil
-}
-
-// Close removes all watches and closes the events channel.
-func (w *Watcher) Close() error {
- if w.isClosed {
- return nil
- }
- w.isClosed = true
-
- // Send "quit" message to the reader goroutine
- ch := make(chan error)
- w.quit <- ch
- if err := w.wakeupReader(); err != nil {
- return err
- }
- return <-ch
-}
-
-// Add starts watching the named file or directory (non-recursively).
-func (w *Watcher) Add(name string) error {
- if w.isClosed {
- return errors.New("watcher already closed")
- }
- in := &input{
- op: opAddWatch,
- path: filepath.Clean(name),
- flags: sysFSALLEVENTS,
- reply: make(chan error),
- }
- w.input <- in
- if err := w.wakeupReader(); err != nil {
- return err
- }
- return <-in.reply
-}
-
-// Remove stops watching the the named file or directory (non-recursively).
-func (w *Watcher) Remove(name string) error {
- in := &input{
- op: opRemoveWatch,
- path: filepath.Clean(name),
- reply: make(chan error),
- }
- w.input <- in
- if err := w.wakeupReader(); err != nil {
- return err
- }
- return <-in.reply
-}
-
-// WatchList returns the directories and files that are being monitered.
-func (w *Watcher) WatchList() []string {
- w.mu.Lock()
- defer w.mu.Unlock()
-
- entries := make([]string, 0, len(w.watches))
- for _, entry := range w.watches {
- for _, watchEntry := range entry {
- entries = append(entries, watchEntry.path)
- }
- }
-
- return entries
-}
-
-const (
- // Options for AddWatch
- sysFSONESHOT = 0x80000000
- sysFSONLYDIR = 0x1000000
-
- // Events
- sysFSACCESS = 0x1
- sysFSALLEVENTS = 0xfff
- sysFSATTRIB = 0x4
- sysFSCLOSE = 0x18
- sysFSCREATE = 0x100
- sysFSDELETE = 0x200
- sysFSDELETESELF = 0x400
- sysFSMODIFY = 0x2
- sysFSMOVE = 0xc0
- sysFSMOVEDFROM = 0x40
- sysFSMOVEDTO = 0x80
- sysFSMOVESELF = 0x800
-
- // Special events
- sysFSIGNORED = 0x8000
- sysFSQOVERFLOW = 0x4000
-)
-
-func newEvent(name string, mask uint32) Event {
- e := Event{Name: name}
- if mask&sysFSCREATE == sysFSCREATE || mask&sysFSMOVEDTO == sysFSMOVEDTO {
- e.Op |= Create
- }
- if mask&sysFSDELETE == sysFSDELETE || mask&sysFSDELETESELF == sysFSDELETESELF {
- e.Op |= Remove
- }
- if mask&sysFSMODIFY == sysFSMODIFY {
- e.Op |= Write
- }
- if mask&sysFSMOVE == sysFSMOVE || mask&sysFSMOVESELF == sysFSMOVESELF || mask&sysFSMOVEDFROM == sysFSMOVEDFROM {
- e.Op |= Rename
- }
- if mask&sysFSATTRIB == sysFSATTRIB {
- e.Op |= Chmod
- }
- return e
-}
-
-const (
- opAddWatch = iota
- opRemoveWatch
-)
-
-const (
- provisional uint64 = 1 << (32 + iota)
-)
-
-type input struct {
- op int
- path string
- flags uint32
- reply chan error
-}
-
-type inode struct {
- handle syscall.Handle
- volume uint32
- index uint64
-}
-
-type watch struct {
- ov syscall.Overlapped
- ino *inode // i-number
- path string // Directory path
- mask uint64 // Directory itself is being watched with these notify flags
- names map[string]uint64 // Map of names being watched and their notify flags
- rename string // Remembers the old name while renaming a file
- buf [4096]byte
-}
-
-type indexMap map[uint64]*watch
-type watchMap map[uint32]indexMap
-
-func (w *Watcher) wakeupReader() error {
- e := syscall.PostQueuedCompletionStatus(w.port, 0, 0, nil)
- if e != nil {
- return os.NewSyscallError("PostQueuedCompletionStatus", e)
- }
- return nil
-}
-
-func getDir(pathname string) (dir string, err error) {
- attr, e := syscall.GetFileAttributes(syscall.StringToUTF16Ptr(pathname))
- if e != nil {
- return "", os.NewSyscallError("GetFileAttributes", e)
- }
- if attr&syscall.FILE_ATTRIBUTE_DIRECTORY != 0 {
- dir = pathname
- } else {
- dir, _ = filepath.Split(pathname)
- dir = filepath.Clean(dir)
- }
- return
-}
-
-func getIno(path string) (ino *inode, err error) {
- h, e := syscall.CreateFile(syscall.StringToUTF16Ptr(path),
- syscall.FILE_LIST_DIRECTORY,
- syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE|syscall.FILE_SHARE_DELETE,
- nil, syscall.OPEN_EXISTING,
- syscall.FILE_FLAG_BACKUP_SEMANTICS|syscall.FILE_FLAG_OVERLAPPED, 0)
- if e != nil {
- return nil, os.NewSyscallError("CreateFile", e)
- }
- var fi syscall.ByHandleFileInformation
- if e = syscall.GetFileInformationByHandle(h, &fi); e != nil {
- syscall.CloseHandle(h)
- return nil, os.NewSyscallError("GetFileInformationByHandle", e)
- }
- ino = &inode{
- handle: h,
- volume: fi.VolumeSerialNumber,
- index: uint64(fi.FileIndexHigh)<<32 | uint64(fi.FileIndexLow),
- }
- return ino, nil
-}
-
-// Must run within the I/O thread.
-func (m watchMap) get(ino *inode) *watch {
- if i := m[ino.volume]; i != nil {
- return i[ino.index]
- }
- return nil
-}
-
-// Must run within the I/O thread.
-func (m watchMap) set(ino *inode, watch *watch) {
- i := m[ino.volume]
- if i == nil {
- i = make(indexMap)
- m[ino.volume] = i
- }
- i[ino.index] = watch
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) addWatch(pathname string, flags uint64) error {
- dir, err := getDir(pathname)
- if err != nil {
- return err
- }
- if flags&sysFSONLYDIR != 0 && pathname != dir {
- return nil
- }
- ino, err := getIno(dir)
- if err != nil {
- return err
- }
- w.mu.Lock()
- watchEntry := w.watches.get(ino)
- w.mu.Unlock()
- if watchEntry == nil {
- if _, e := syscall.CreateIoCompletionPort(ino.handle, w.port, 0, 0); e != nil {
- syscall.CloseHandle(ino.handle)
- return os.NewSyscallError("CreateIoCompletionPort", e)
- }
- watchEntry = &watch{
- ino: ino,
- path: dir,
- names: make(map[string]uint64),
- }
- w.mu.Lock()
- w.watches.set(ino, watchEntry)
- w.mu.Unlock()
- flags |= provisional
- } else {
- syscall.CloseHandle(ino.handle)
- }
- if pathname == dir {
- watchEntry.mask |= flags
- } else {
- watchEntry.names[filepath.Base(pathname)] |= flags
- }
- if err = w.startRead(watchEntry); err != nil {
- return err
- }
- if pathname == dir {
- watchEntry.mask &= ^provisional
- } else {
- watchEntry.names[filepath.Base(pathname)] &= ^provisional
- }
- return nil
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) remWatch(pathname string) error {
- dir, err := getDir(pathname)
- if err != nil {
- return err
- }
- ino, err := getIno(dir)
- if err != nil {
- return err
- }
- w.mu.Lock()
- watch := w.watches.get(ino)
- w.mu.Unlock()
- if watch == nil {
- return fmt.Errorf("can't remove non-existent watch for: %s", pathname)
- }
- if pathname == dir {
- w.sendEvent(watch.path, watch.mask&sysFSIGNORED)
- watch.mask = 0
- } else {
- name := filepath.Base(pathname)
- w.sendEvent(filepath.Join(watch.path, name), watch.names[name]&sysFSIGNORED)
- delete(watch.names, name)
- }
- return w.startRead(watch)
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) deleteWatch(watch *watch) {
- for name, mask := range watch.names {
- if mask&provisional == 0 {
- w.sendEvent(filepath.Join(watch.path, name), mask&sysFSIGNORED)
- }
- delete(watch.names, name)
- }
- if watch.mask != 0 {
- if watch.mask&provisional == 0 {
- w.sendEvent(watch.path, watch.mask&sysFSIGNORED)
- }
- watch.mask = 0
- }
-}
-
-// Must run within the I/O thread.
-func (w *Watcher) startRead(watch *watch) error {
- if e := syscall.CancelIo(watch.ino.handle); e != nil {
- w.Errors <- os.NewSyscallError("CancelIo", e)
- w.deleteWatch(watch)
- }
- mask := toWindowsFlags(watch.mask)
- for _, m := range watch.names {
- mask |= toWindowsFlags(m)
- }
- if mask == 0 {
- if e := syscall.CloseHandle(watch.ino.handle); e != nil {
- w.Errors <- os.NewSyscallError("CloseHandle", e)
- }
- w.mu.Lock()
- delete(w.watches[watch.ino.volume], watch.ino.index)
- w.mu.Unlock()
- return nil
- }
- e := syscall.ReadDirectoryChanges(watch.ino.handle, &watch.buf[0],
- uint32(unsafe.Sizeof(watch.buf)), false, mask, nil, &watch.ov, 0)
- if e != nil {
- err := os.NewSyscallError("ReadDirectoryChanges", e)
- if e == syscall.ERROR_ACCESS_DENIED && watch.mask&provisional == 0 {
- // Watched directory was probably removed
- if w.sendEvent(watch.path, watch.mask&sysFSDELETESELF) {
- if watch.mask&sysFSONESHOT != 0 {
- watch.mask = 0
- }
- }
- err = nil
- }
- w.deleteWatch(watch)
- w.startRead(watch)
- return err
- }
- return nil
-}
-
-// readEvents reads from the I/O completion port, converts the
-// received events into Event objects and sends them via the Events channel.
-// Entry point to the I/O thread.
-func (w *Watcher) readEvents() {
- var (
- n, key uint32
- ov *syscall.Overlapped
- )
- runtime.LockOSThread()
-
- for {
- e := syscall.GetQueuedCompletionStatus(w.port, &n, &key, &ov, syscall.INFINITE)
- watch := (*watch)(unsafe.Pointer(ov))
-
- if watch == nil {
- select {
- case ch := <-w.quit:
- w.mu.Lock()
- var indexes []indexMap
- for _, index := range w.watches {
- indexes = append(indexes, index)
- }
- w.mu.Unlock()
- for _, index := range indexes {
- for _, watch := range index {
- w.deleteWatch(watch)
- w.startRead(watch)
- }
- }
- var err error
- if e := syscall.CloseHandle(w.port); e != nil {
- err = os.NewSyscallError("CloseHandle", e)
- }
- close(w.Events)
- close(w.Errors)
- ch <- err
- return
- case in := <-w.input:
- switch in.op {
- case opAddWatch:
- in.reply <- w.addWatch(in.path, uint64(in.flags))
- case opRemoveWatch:
- in.reply <- w.remWatch(in.path)
- }
- default:
- }
- continue
- }
-
- switch e {
- case syscall.ERROR_MORE_DATA:
- if watch == nil {
- w.Errors <- errors.New("ERROR_MORE_DATA has unexpectedly null lpOverlapped buffer")
- } else {
- // The i/o succeeded but the buffer is full.
- // In theory we should be building up a full packet.
- // In practice we can get away with just carrying on.
- n = uint32(unsafe.Sizeof(watch.buf))
- }
- case syscall.ERROR_ACCESS_DENIED:
- // Watched directory was probably removed
- w.sendEvent(watch.path, watch.mask&sysFSDELETESELF)
- w.deleteWatch(watch)
- w.startRead(watch)
- continue
- case syscall.ERROR_OPERATION_ABORTED:
- // CancelIo was called on this handle
- continue
- default:
- w.Errors <- os.NewSyscallError("GetQueuedCompletionPort", e)
- continue
- case nil:
- }
-
- var offset uint32
- for {
- if n == 0 {
- w.Events <- newEvent("", sysFSQOVERFLOW)
- w.Errors <- errors.New("short read in readEvents()")
- break
- }
-
- // Point "raw" to the event in the buffer
- raw := (*syscall.FileNotifyInformation)(unsafe.Pointer(&watch.buf[offset]))
- // TODO: Consider using unsafe.Slice that is available from go1.17
- // https://stackoverflow.com/questions/51187973/how-to-create-an-array-or-a-slice-from-an-array-unsafe-pointer-in-golang
- // instead of using a fixed syscall.MAX_PATH buf, we create a buf that is the size of the path name
- size := int(raw.FileNameLength / 2)
- var buf []uint16
- sh := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
- sh.Data = uintptr(unsafe.Pointer(&raw.FileName))
- sh.Len = size
- sh.Cap = size
- name := syscall.UTF16ToString(buf)
- fullname := filepath.Join(watch.path, name)
-
- var mask uint64
- switch raw.Action {
- case syscall.FILE_ACTION_REMOVED:
- mask = sysFSDELETESELF
- case syscall.FILE_ACTION_MODIFIED:
- mask = sysFSMODIFY
- case syscall.FILE_ACTION_RENAMED_OLD_NAME:
- watch.rename = name
- case syscall.FILE_ACTION_RENAMED_NEW_NAME:
- if watch.names[watch.rename] != 0 {
- watch.names[name] |= watch.names[watch.rename]
- delete(watch.names, watch.rename)
- mask = sysFSMOVESELF
- }
- }
-
- sendNameEvent := func() {
- if w.sendEvent(fullname, watch.names[name]&mask) {
- if watch.names[name]&sysFSONESHOT != 0 {
- delete(watch.names, name)
- }
- }
- }
- if raw.Action != syscall.FILE_ACTION_RENAMED_NEW_NAME {
- sendNameEvent()
- }
- if raw.Action == syscall.FILE_ACTION_REMOVED {
- w.sendEvent(fullname, watch.names[name]&sysFSIGNORED)
- delete(watch.names, name)
- }
- if w.sendEvent(fullname, watch.mask&toFSnotifyFlags(raw.Action)) {
- if watch.mask&sysFSONESHOT != 0 {
- watch.mask = 0
- }
- }
- if raw.Action == syscall.FILE_ACTION_RENAMED_NEW_NAME {
- fullname = filepath.Join(watch.path, watch.rename)
- sendNameEvent()
- }
-
- // Move to the next event in the buffer
- if raw.NextEntryOffset == 0 {
- break
- }
- offset += raw.NextEntryOffset
-
- // Error!
- if offset >= n {
- w.Errors <- errors.New("Windows system assumed buffer larger than it is, events have likely been missed.")
- break
- }
- }
-
- if err := w.startRead(watch); err != nil {
- w.Errors <- err
- }
- }
-}
-
-func (w *Watcher) sendEvent(name string, mask uint64) bool {
- if mask == 0 {
- return false
- }
- event := newEvent(name, uint32(mask))
- select {
- case ch := <-w.quit:
- w.quit <- ch
- case w.Events <- event:
- }
- return true
-}
-
-func toWindowsFlags(mask uint64) uint32 {
- var m uint32
- if mask&sysFSACCESS != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_LAST_ACCESS
- }
- if mask&sysFSMODIFY != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_LAST_WRITE
- }
- if mask&sysFSATTRIB != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_ATTRIBUTES
- }
- if mask&(sysFSMOVE|sysFSCREATE|sysFSDELETE) != 0 {
- m |= syscall.FILE_NOTIFY_CHANGE_FILE_NAME | syscall.FILE_NOTIFY_CHANGE_DIR_NAME
- }
- return m
-}
-
-func toFSnotifyFlags(action uint32) uint64 {
- switch action {
- case syscall.FILE_ACTION_ADDED:
- return sysFSCREATE
- case syscall.FILE_ACTION_REMOVED:
- return sysFSDELETE
- case syscall.FILE_ACTION_MODIFIED:
- return sysFSMODIFY
- case syscall.FILE_ACTION_RENAMED_OLD_NAME:
- return sysFSMOVEDFROM
- case syscall.FILE_ACTION_RENAMED_NEW_NAME:
- return sysFSMOVEDTO
- }
- return 0
-}
diff --git a/vendor/github.com/gomarkdown/markdown/ast/node.go b/vendor/github.com/gomarkdown/markdown/ast/node.go
index e2031193..1d558dd3 100644
--- a/vendor/github.com/gomarkdown/markdown/ast/node.go
+++ b/vendor/github.com/gomarkdown/markdown/ast/node.go
@@ -157,9 +157,13 @@ func (l *Leaf) GetChildren() []Node {
return nil
}
-// SetChildren will panic becuase Leaf cannot have children
+// SetChildren will panic if trying to set non-empty children
+// because Leaf cannot have children
func (l *Leaf) SetChildren(newChildren []Node) {
- panic("leaf node cannot have children")
+ if len(newChildren) != 0 {
+ panic("leaf node cannot have children")
+ }
+
}
// Document represents markdown document node, a root of ast
diff --git a/vendor/github.com/gomarkdown/markdown/parser/block.go b/vendor/github.com/gomarkdown/markdown/parser/block.go
index eda9be7a..490871c7 100644
--- a/vendor/github.com/gomarkdown/markdown/parser/block.go
+++ b/vendor/github.com/gomarkdown/markdown/parser/block.go
@@ -1419,6 +1419,16 @@ gatherlines:
chunk := data[line+indentIndex : i]
+ // If there is a fence line (marking starting of a code block)
+ // without indent do not process it as part of the list.
+ if p.extensions&FencedCode != 0 {
+ fenceLineEnd, _ := isFenceLine(chunk, nil, "")
+ if fenceLineEnd > 0 && indent == 0 {
+ *flags |= ast.ListItemEndOfList
+ break gatherlines
+ }
+ }
+
// evaluate how this line fits in
switch {
// is this a nested list item?
diff --git a/vendor/github.com/gomarkdown/markdown/parser/inline.go b/vendor/github.com/gomarkdown/markdown/parser/inline.go
index 70d38f29..035d90a0 100644
--- a/vendor/github.com/gomarkdown/markdown/parser/inline.go
+++ b/vendor/github.com/gomarkdown/markdown/parser/inline.go
@@ -157,6 +157,7 @@ func codeSpan(p *Parser, data []byte, offset int) (int, ast.Node) {
}
if !IsSpace(data[j]) {
hasCharsAfterDelimiter = true
+ break
}
}
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/kbchat.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/kbchat.go
index b4b5e5e8..b8d9eb3c 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/kbchat.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/kbchat.go
@@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"io"
- "io/ioutil"
"os"
"os/exec"
"runtime"
@@ -218,7 +217,7 @@ func (a *API) getUsername(runOpts RunOptions) (username string, err error) {
doneCh := make(chan error)
go func() {
defer func() { close(doneCh) }()
- statusJSON, err := ioutil.ReadAll(output)
+ statusJSON, err := io.ReadAll(output)
if err != nil {
doneCh <- fmt.Errorf("error reading whoami output: %v", err)
return
@@ -533,7 +532,7 @@ func (a *API) Listen(opts ListenOptions) (*Subscription, error) {
case <-done:
}
if err := p.Wait(); err != nil {
- stderrBytes, rerr := ioutil.ReadAll(stderr)
+ stderrBytes, rerr := io.ReadAll(stderr)
if rerr != nil {
stderrBytes = []byte(fmt.Sprintf("failed to get stderr: %v", rerr))
}
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/test_utils.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/test_utils.go
index 5d079a1c..e30d8e51 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/test_utils.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/test_utils.go
@@ -3,7 +3,6 @@ package kbchat
import (
"crypto/rand"
"encoding/hex"
- "io/ioutil"
"os"
"os/exec"
"path"
@@ -33,9 +32,9 @@ func whichKeybase(t *testing.T) string {
}
func copyFile(t *testing.T, source, dest string) {
- sourceData, err := ioutil.ReadFile(source)
+ sourceData, err := os.ReadFile(source)
require.NoError(t, err)
- err = ioutil.WriteFile(dest, sourceData, 0777)
+ err = os.WriteFile(dest, sourceData, 0777)
require.NoError(t, err)
}
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/api.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/api.go
index d6c13496..0d2e90aa 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/api.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/api.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/api.avdl
package chat1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/blocking.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/blocking.go
index bc6da3eb..d32208fb 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/blocking.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/blocking.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/blocking.avdl
package chat1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/chat_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/chat_ui.go
index 40ce655e..95f2b72b 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/chat_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/chat_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/chat_ui.avdl
package chat1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/commands.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/commands.go
index 6a28d100..873ad76b 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/commands.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/commands.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/commands.avdl
package chat1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/common.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/common.go
index 530c49c1..f67e3e2f 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/common.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/common.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/common.avdl
package chat1
@@ -2005,6 +2005,8 @@ const (
GetThreadReason_COINFLIP GetThreadReason = 9
GetThreadReason_BOTCOMMANDS GetThreadReason = 10
GetThreadReason_EMOJISOURCE GetThreadReason = 11
+ GetThreadReason_FORWARDMSG GetThreadReason = 12
+ GetThreadReason_LOCALIZE GetThreadReason = 13
)
func (o GetThreadReason) DeepCopy() GetThreadReason { return o }
@@ -2022,6 +2024,8 @@ var GetThreadReasonMap = map[string]GetThreadReason{
"COINFLIP": 9,
"BOTCOMMANDS": 10,
"EMOJISOURCE": 11,
+ "FORWARDMSG": 12,
+ "LOCALIZE": 13,
}
var GetThreadReasonRevMap = map[GetThreadReason]string{
@@ -2037,6 +2041,8 @@ var GetThreadReasonRevMap = map[GetThreadReason]string{
9: "COINFLIP",
10: "BOTCOMMANDS",
11: "EMOJISOURCE",
+ 12: "FORWARDMSG",
+ 13: "LOCALIZE",
}
func (e GetThreadReason) String() string {
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/emoji.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/emoji.go
index 6e756924..4a5dbb94 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/emoji.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/emoji.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/emoji.avdl
package chat1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/gregor.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/gregor.go
index 01210c46..e9888d2e 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/gregor.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/gregor.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/gregor.avdl
package chat1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/local.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/local.go
index 2f85c106..6db180cd 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/local.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/local.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/local.avdl
package chat1
@@ -5150,6 +5150,28 @@ func (o MarkAsReadLocalRes) DeepCopy() MarkAsReadLocalRes {
}
}
+type MarkTLFAsReadLocalRes struct {
+ Offline bool `codec:"offline" json:"offline"`
+ RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"`
+}
+
+func (o MarkTLFAsReadLocalRes) DeepCopy() MarkTLFAsReadLocalRes {
+ return MarkTLFAsReadLocalRes{
+ Offline: o.Offline,
+ RateLimits: (func(x []RateLimit) []RateLimit {
+ if x == nil {
+ return nil
+ }
+ ret := make([]RateLimit, len(x))
+ for i, v := range x {
+ vCopy := v.DeepCopy()
+ ret[i] = vCopy
+ }
+ return ret
+ })(o.RateLimits),
+ }
+}
+
type FindConversationsLocalRes struct {
Conversations []ConversationLocal `codec:"conversations" json:"conversations"`
UiConversations []InboxUIItem `codec:"uiConversations" json:"uiConversations"`
@@ -5276,6 +5298,26 @@ func (o DeleteConversationLocalRes) DeepCopy() DeleteConversationLocalRes {
}
}
+type RemoveFromConversationLocalRes struct {
+ RateLimits []RateLimit `codec:"rateLimits" json:"rateLimits"`
+}
+
+func (o RemoveFromConversationLocalRes) DeepCopy() RemoveFromConversationLocalRes {
+ return RemoveFromConversationLocalRes{
+ RateLimits: (func(x []RateLimit) []RateLimit {
+ if x == nil {
+ return nil
+ }
+ ret := make([]RateLimit, len(x))
+ for i, v := range x {
+ vCopy := v.DeepCopy()
+ ret[i] = vCopy
+ }
+ return ret
+ })(o.RateLimits),
+ }
+}
+
type GetTLFConversationsLocalRes struct {
Convs []InboxUIItem `codec:"convs" json:"convs"`
Offline bool `codec:"offline" json:"offline"`
@@ -6112,15 +6154,15 @@ func (o PinMessageRes) DeepCopy() PinMessageRes {
}
}
-type AddBotConvSearchHit struct {
+type ConvSearchHit struct {
Name string `codec:"name" json:"name"`
ConvID ConversationID `codec:"convID" json:"convID"`
IsTeam bool `codec:"isTeam" json:"isTeam"`
Parts []string `codec:"parts" json:"parts"`
}
-func (o AddBotConvSearchHit) DeepCopy() AddBotConvSearchHit {
- return AddBotConvSearchHit{
+func (o ConvSearchHit) DeepCopy() ConvSearchHit {
+ return ConvSearchHit{
Name: o.Name,
ConvID: o.ConvID.DeepCopy(),
IsTeam: o.IsTeam,
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/notify.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/notify.go
index 7d4ba74e..5d1657d8 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/notify.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/notify.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/notify.avdl
package chat1
@@ -115,7 +115,7 @@ func (o IncomingMessage) DeepCopy() IncomingMessage {
tmp := (*x).DeepCopy()
return &tmp
})(o.ModifiedMessage),
- ConvID: o.ConvID.DeepCopy(),
+ ConvID: o.ConvID.DeepCopy(),
DisplayDesktopNotification: o.DisplayDesktopNotification,
DesktopNotificationSnippet: o.DesktopNotificationSnippet,
Conv: (func(x *InboxUIItem) *InboxUIItem {
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/remote.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/remote.go
index 231af30e..51727ef1 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/remote.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/remote.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/remote.avdl
package chat1
@@ -704,6 +704,22 @@ func (o DeleteConversationRemoteRes) DeepCopy() DeleteConversationRemoteRes {
}
}
+type RemoveFromConversationRemoteRes struct {
+ RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"`
+}
+
+func (o RemoveFromConversationRemoteRes) DeepCopy() RemoveFromConversationRemoteRes {
+ return RemoveFromConversationRemoteRes{
+ RateLimit: (func(x *RateLimit) *RateLimit {
+ if x == nil {
+ return nil
+ }
+ tmp := (*x).DeepCopy()
+ return &tmp
+ })(o.RateLimit),
+ }
+}
+
type GetMessageBeforeRes struct {
MsgID MessageID `codec:"msgID" json:"msgID"`
RateLimit *RateLimit `codec:"rateLimit,omitempty" json:"rateLimit,omitempty"`
@@ -1115,11 +1131,12 @@ func (o RemoteBotCommandsAdvertisement) DeepCopy() RemoteBotCommandsAdvertisemen
}
type BotCommandConv struct {
- Uid gregor1.UID `codec:"uid" json:"uid"`
- UntrustedTeamRole keybase1.TeamRole `codec:"untrustedTeamRole" json:"untrustedTeamRole"`
- ConvID ConversationID `codec:"convID" json:"convID"`
- Vers CommandConvVers `codec:"vers" json:"vers"`
- Mtime gregor1.Time `codec:"mtime" json:"mtime"`
+ Uid gregor1.UID `codec:"uid" json:"uid"`
+ UntrustedTeamRole keybase1.TeamRole `codec:"untrustedTeamRole" json:"untrustedTeamRole"`
+ ConvID ConversationID `codec:"convID" json:"convID"`
+ Vers CommandConvVers `codec:"vers" json:"vers"`
+ Mtime gregor1.Time `codec:"mtime" json:"mtime"`
+ Typ BotCommandsAdvertisementTyp `codec:"typ" json:"typ"`
}
func (o BotCommandConv) DeepCopy() BotCommandConv {
@@ -1129,6 +1146,7 @@ func (o BotCommandConv) DeepCopy() BotCommandConv {
ConvID: o.ConvID.DeepCopy(),
Vers: o.Vers.DeepCopy(),
Mtime: o.Mtime.DeepCopy(),
+ Typ: o.Typ.DeepCopy(),
}
}
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/unfurl.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/unfurl.go
index 6c3cc248..abb5bf63 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/unfurl.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1/unfurl.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/chat1/unfurl.avdl
package chat1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth.go
index 9d046db8..7214ae43 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/gregor1/auth.avdl
package gregor1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth_internal.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth_internal.go
index f6538cef..4729426d 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth_internal.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth_internal.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/gregor1/auth_internal.avdl
package gregor1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth_update.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth_update.go
index 5a46086a..6766316f 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth_update.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/auth_update.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/gregor1/auth_update.avdl
package gregor1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/common.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/common.go
index f842ea5b..e2130c45 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/common.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/common.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/gregor1/common.avdl
package gregor1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/incoming.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/incoming.go
index c6b72805..fcd586fa 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/incoming.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/incoming.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/gregor1/incoming.avdl
package gregor1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/outgoing.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/outgoing.go
index 48b4415f..4dde550a 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/outgoing.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/outgoing.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/gregor1/outgoing.avdl
package gregor1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/remind.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/remind.go
index 48c904b1..fc69c622 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/remind.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/gregor1/remind.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/gregor1/remind.avdl
package gregor1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/account.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/account.go
index ad02226e..484e4803 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/account.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/account.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/account.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/airdrop.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/airdrop.go
index 1208a83a..c5c1430a 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/airdrop.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/airdrop.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/airdrop.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/apiserver.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/apiserver.go
index dfae6490..64cc6b6a 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/apiserver.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/apiserver.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/apiserver.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/appstate.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/appstate.go
index 5dcb87e0..7c00585e 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/appstate.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/appstate.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/appstate.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/audit.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/audit.go
index 052408a7..07260406 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/audit.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/audit.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/audit.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/avatars.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/avatars.go
index 16834344..9a3163f8 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/avatars.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/avatars.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/avatars.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/backend_common.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/backend_common.go
index 8de73b78..5457e3c4 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/backend_common.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/backend_common.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/backend_common.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/badger.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/badger.go
index c56bcda5..d9e8e5ab 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/badger.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/badger.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/badger.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/block.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/block.go
index 7e89bedc..0d0721e2 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/block.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/block.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/block.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/bot.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/bot.go
index 7520d839..6858ffb5 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/bot.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/bot.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/bot.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/btc.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/btc.go
index 1cd8ca41..5b04df56 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/btc.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/btc.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/btc.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/common.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/common.go
index 4b4ae791..1b0d3fe3 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/common.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/common.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/common.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/config.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/config.go
index 49debf40..ee289fe1 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/config.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/config.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/config.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/constants.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/constants.go
index 75242f83..858033d1 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/constants.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/constants.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/constants.avdl
package keybase1
@@ -261,142 +261,142 @@ const (
func (o StatusCode) DeepCopy() StatusCode { return o }
var StatusCodeMap = map[string]StatusCode{
- "SCOk": 0,
- "SCInputError": 100,
- "SCAssertionParseError": 101,
- "SCLoginRequired": 201,
- "SCBadSession": 202,
- "SCBadLoginUserNotFound": 203,
- "SCBadLoginPassword": 204,
- "SCNotFound": 205,
- "SCThrottleControl": 210,
- "SCDeleted": 216,
- "SCGeneric": 218,
- "SCAlreadyLoggedIn": 235,
- "SCExists": 230,
- "SCCanceled": 237,
- "SCInputCanceled": 239,
- "SCBadUsername": 243,
- "SCOffline": 267,
- "SCReloginRequired": 274,
- "SCResolutionFailed": 275,
- "SCProfileNotPublic": 276,
- "SCIdentifyFailed": 277,
- "SCTrackingBroke": 278,
- "SCWrongCryptoFormat": 279,
- "SCDecryptionError": 280,
- "SCInvalidAddress": 281,
- "SCWrongCryptoMsgType": 282,
- "SCNoSession": 283,
- "SCAccountReset": 290,
- "SCIdentifiesFailed": 295,
- "SCNoSpaceOnDevice": 297,
- "SCMerkleClientError": 299,
- "SCMerkleUpdateRoot": 300,
- "SCBadEmail": 472,
- "SCRateLimit": 602,
- "SCBadSignupUsernameTaken": 701,
- "SCDuplicate": 706,
- "SCBadInvitationCode": 707,
- "SCBadSignupUsernameReserved": 710,
- "SCBadSignupTeamName": 711,
- "SCFeatureFlag": 712,
- "SCEmailTaken": 713,
- "SCEmailAlreadyAdded": 714,
- "SCEmailLimitExceeded": 715,
- "SCEmailCannotDeletePrimary": 716,
- "SCEmailUnknown": 717,
- "SCBotSignupTokenNotFound": 719,
- "SCNoUpdate": 723,
- "SCMissingResult": 801,
- "SCKeyNotFound": 901,
- "SCKeyCorrupted": 905,
- "SCKeyInUse": 907,
- "SCKeyBadGen": 913,
- "SCKeyNoSecret": 914,
- "SCKeyBadUIDs": 915,
- "SCKeyNoActive": 916,
- "SCKeyNoSig": 917,
- "SCKeyBadSig": 918,
- "SCKeyBadEldest": 919,
- "SCKeyNoEldest": 920,
- "SCKeyDuplicateUpdate": 921,
- "SCSibkeyAlreadyExists": 922,
- "SCDecryptionKeyNotFound": 924,
- "SCVerificationKeyNotFound": 925,
- "SCKeyNoPGPEncryption": 927,
- "SCKeyNoNaClEncryption": 928,
- "SCKeySyncedPGPNotFound": 929,
- "SCKeyNoMatchingGPG": 930,
- "SCKeyRevoked": 931,
- "SCSigCannotVerify": 1002,
- "SCSigWrongKey": 1008,
- "SCSigOldSeqno": 1010,
- "SCSigCreationDisallowed": 1016,
- "SCSigMissingRatchet": 1021,
- "SCSigBadTotalOrder": 1022,
- "SCBadTrackSession": 1301,
- "SCDeviceBadName": 1404,
- "SCDeviceBadStatus": 1405,
- "SCDeviceNameInUse": 1408,
- "SCDeviceNotFound": 1409,
- "SCDeviceMismatch": 1410,
- "SCDeviceRequired": 1411,
- "SCDevicePrevProvisioned": 1413,
- "SCDeviceNoProvision": 1414,
- "SCDeviceProvisionViaDevice": 1415,
- "SCRevokeCurrentDevice": 1416,
- "SCRevokeLastDevice": 1417,
- "SCDeviceProvisionOffline": 1418,
- "SCRevokeLastDevicePGP": 1419,
- "SCStreamExists": 1501,
- "SCStreamNotFound": 1502,
- "SCStreamWrongKind": 1503,
- "SCStreamEOF": 1504,
- "SCStreamUnknown": 1505,
- "SCGenericAPIError": 1600,
- "SCAPINetworkError": 1601,
- "SCTimeout": 1602,
- "SCKBFSClientTimeout": 1603,
- "SCProofError": 1701,
- "SCIdentificationExpired": 1702,
- "SCSelfNotFound": 1703,
- "SCBadKexPhrase": 1704,
- "SCNoUIDelegation": 1705,
- "SCNoUI": 1706,
- "SCGPGUnavailable": 1707,
- "SCInvalidVersionError": 1800,
- "SCOldVersionError": 1801,
- "SCInvalidLocationError": 1802,
- "SCServiceStatusError": 1803,
- "SCInstallError": 1804,
- "SCLoadKextError": 1810,
- "SCLoadKextPermError": 1811,
- "SCGitInternal": 2300,
- "SCGitRepoAlreadyExists": 2301,
- "SCGitInvalidRepoName": 2302,
- "SCGitCannotDelete": 2303,
- "SCGitRepoDoesntExist": 2304,
- "SCLoginStateTimeout": 2400,
- "SCChatInternal": 2500,
- "SCChatRateLimit": 2501,
- "SCChatConvExists": 2502,
- "SCChatUnknownTLFID": 2503,
- "SCChatNotInConv": 2504,
- "SCChatBadMsg": 2505,
- "SCChatBroadcast": 2506,
- "SCChatAlreadySuperseded": 2507,
- "SCChatAlreadyDeleted": 2508,
- "SCChatTLFFinalized": 2509,
- "SCChatCollision": 2510,
- "SCIdentifySummaryError": 2511,
- "SCNeedSelfRekey": 2512,
- "SCNeedOtherRekey": 2513,
- "SCChatMessageCollision": 2514,
- "SCChatDuplicateMessage": 2515,
- "SCChatClientError": 2516,
- "SCChatNotInTeam": 2517,
- "SCChatStalePreviousState": 2518,
+ "SCOk": 0,
+ "SCInputError": 100,
+ "SCAssertionParseError": 101,
+ "SCLoginRequired": 201,
+ "SCBadSession": 202,
+ "SCBadLoginUserNotFound": 203,
+ "SCBadLoginPassword": 204,
+ "SCNotFound": 205,
+ "SCThrottleControl": 210,
+ "SCDeleted": 216,
+ "SCGeneric": 218,
+ "SCAlreadyLoggedIn": 235,
+ "SCExists": 230,
+ "SCCanceled": 237,
+ "SCInputCanceled": 239,
+ "SCBadUsername": 243,
+ "SCOffline": 267,
+ "SCReloginRequired": 274,
+ "SCResolutionFailed": 275,
+ "SCProfileNotPublic": 276,
+ "SCIdentifyFailed": 277,
+ "SCTrackingBroke": 278,
+ "SCWrongCryptoFormat": 279,
+ "SCDecryptionError": 280,
+ "SCInvalidAddress": 281,
+ "SCWrongCryptoMsgType": 282,
+ "SCNoSession": 283,
+ "SCAccountReset": 290,
+ "SCIdentifiesFailed": 295,
+ "SCNoSpaceOnDevice": 297,
+ "SCMerkleClientError": 299,
+ "SCMerkleUpdateRoot": 300,
+ "SCBadEmail": 472,
+ "SCRateLimit": 602,
+ "SCBadSignupUsernameTaken": 701,
+ "SCDuplicate": 706,
+ "SCBadInvitationCode": 707,
+ "SCBadSignupUsernameReserved": 710,
+ "SCBadSignupTeamName": 711,
+ "SCFeatureFlag": 712,
+ "SCEmailTaken": 713,
+ "SCEmailAlreadyAdded": 714,
+ "SCEmailLimitExceeded": 715,
+ "SCEmailCannotDeletePrimary": 716,
+ "SCEmailUnknown": 717,
+ "SCBotSignupTokenNotFound": 719,
+ "SCNoUpdate": 723,
+ "SCMissingResult": 801,
+ "SCKeyNotFound": 901,
+ "SCKeyCorrupted": 905,
+ "SCKeyInUse": 907,
+ "SCKeyBadGen": 913,
+ "SCKeyNoSecret": 914,
+ "SCKeyBadUIDs": 915,
+ "SCKeyNoActive": 916,
+ "SCKeyNoSig": 917,
+ "SCKeyBadSig": 918,
+ "SCKeyBadEldest": 919,
+ "SCKeyNoEldest": 920,
+ "SCKeyDuplicateUpdate": 921,
+ "SCSibkeyAlreadyExists": 922,
+ "SCDecryptionKeyNotFound": 924,
+ "SCVerificationKeyNotFound": 925,
+ "SCKeyNoPGPEncryption": 927,
+ "SCKeyNoNaClEncryption": 928,
+ "SCKeySyncedPGPNotFound": 929,
+ "SCKeyNoMatchingGPG": 930,
+ "SCKeyRevoked": 931,
+ "SCSigCannotVerify": 1002,
+ "SCSigWrongKey": 1008,
+ "SCSigOldSeqno": 1010,
+ "SCSigCreationDisallowed": 1016,
+ "SCSigMissingRatchet": 1021,
+ "SCSigBadTotalOrder": 1022,
+ "SCBadTrackSession": 1301,
+ "SCDeviceBadName": 1404,
+ "SCDeviceBadStatus": 1405,
+ "SCDeviceNameInUse": 1408,
+ "SCDeviceNotFound": 1409,
+ "SCDeviceMismatch": 1410,
+ "SCDeviceRequired": 1411,
+ "SCDevicePrevProvisioned": 1413,
+ "SCDeviceNoProvision": 1414,
+ "SCDeviceProvisionViaDevice": 1415,
+ "SCRevokeCurrentDevice": 1416,
+ "SCRevokeLastDevice": 1417,
+ "SCDeviceProvisionOffline": 1418,
+ "SCRevokeLastDevicePGP": 1419,
+ "SCStreamExists": 1501,
+ "SCStreamNotFound": 1502,
+ "SCStreamWrongKind": 1503,
+ "SCStreamEOF": 1504,
+ "SCStreamUnknown": 1505,
+ "SCGenericAPIError": 1600,
+ "SCAPINetworkError": 1601,
+ "SCTimeout": 1602,
+ "SCKBFSClientTimeout": 1603,
+ "SCProofError": 1701,
+ "SCIdentificationExpired": 1702,
+ "SCSelfNotFound": 1703,
+ "SCBadKexPhrase": 1704,
+ "SCNoUIDelegation": 1705,
+ "SCNoUI": 1706,
+ "SCGPGUnavailable": 1707,
+ "SCInvalidVersionError": 1800,
+ "SCOldVersionError": 1801,
+ "SCInvalidLocationError": 1802,
+ "SCServiceStatusError": 1803,
+ "SCInstallError": 1804,
+ "SCLoadKextError": 1810,
+ "SCLoadKextPermError": 1811,
+ "SCGitInternal": 2300,
+ "SCGitRepoAlreadyExists": 2301,
+ "SCGitInvalidRepoName": 2302,
+ "SCGitCannotDelete": 2303,
+ "SCGitRepoDoesntExist": 2304,
+ "SCLoginStateTimeout": 2400,
+ "SCChatInternal": 2500,
+ "SCChatRateLimit": 2501,
+ "SCChatConvExists": 2502,
+ "SCChatUnknownTLFID": 2503,
+ "SCChatNotInConv": 2504,
+ "SCChatBadMsg": 2505,
+ "SCChatBroadcast": 2506,
+ "SCChatAlreadySuperseded": 2507,
+ "SCChatAlreadyDeleted": 2508,
+ "SCChatTLFFinalized": 2509,
+ "SCChatCollision": 2510,
+ "SCIdentifySummaryError": 2511,
+ "SCNeedSelfRekey": 2512,
+ "SCNeedOtherRekey": 2513,
+ "SCChatMessageCollision": 2514,
+ "SCChatDuplicateMessage": 2515,
+ "SCChatClientError": 2516,
+ "SCChatNotInTeam": 2517,
+ "SCChatStalePreviousState": 2518,
"SCChatEphemeralRetentionPolicyViolatedError": 2519,
"SCChatUsersAlreadyInConversationError": 2520,
"SCChatBadConversationError": 2521,
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/contacts.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/contacts.go
index 995f81bf..cf93d97b 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/contacts.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/contacts.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/contacts.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/crypto.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/crypto.go
index 885a1b0e..ed257ad0 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/crypto.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/crypto.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/crypto.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/cryptocurrency.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/cryptocurrency.go
index d77d1dbd..7be0940a 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/cryptocurrency.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/cryptocurrency.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/cryptocurrency.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ctl.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ctl.go
index 6a2c89e7..adcc4255 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ctl.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ctl.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/ctl.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/debugging.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/debugging.go
index 15b0c95b..b7344667 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/debugging.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/debugging.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/debugging.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/delegate_ui_ctl.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/delegate_ui_ctl.go
index ae1b1476..d031b161 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/delegate_ui_ctl.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/delegate_ui_ctl.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/delegate_ui_ctl.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/device.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/device.go
index fe4ab9a7..9f28012f 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/device.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/device.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/device.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/emails.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/emails.go
index 54b776c3..18a9eb09 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/emails.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/emails.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/emails.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ephemeral.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ephemeral.go
index 4080bfb2..a2a03fff 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ephemeral.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ephemeral.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/ephemeral.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/favorite.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/favorite.go
index e869ab5d..0d159ce6 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/favorite.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/favorite.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/favorite.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/featured_bot.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/featured_bot.go
index b0ba65ef..686b1304 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/featured_bot.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/featured_bot.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/featured_bot.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/fs.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/fs.go
index 4e98fd66..48caf5ff 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/fs.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/fs.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/fs.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/git.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/git.go
index dc50a0f0..024ca568 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/git.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/git.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/git.avdl
package keybase1
@@ -223,8 +223,8 @@ type GitServerMetadata struct {
func (o GitServerMetadata) DeepCopy() GitServerMetadata {
return GitServerMetadata{
- Ctime: o.Ctime.DeepCopy(),
- Mtime: o.Mtime.DeepCopy(),
+ Ctime: o.Ctime.DeepCopy(),
+ Mtime: o.Mtime.DeepCopy(),
LastModifyingUsername: o.LastModifyingUsername,
LastModifyingDeviceID: o.LastModifyingDeviceID.DeepCopy(),
LastModifyingDeviceName: o.LastModifyingDeviceName,
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gpg_common.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gpg_common.go
index 19cfbec7..842fde7b 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gpg_common.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gpg_common.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/gpg_common.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gpg_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gpg_ui.go
index 30313260..3a646f0a 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gpg_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gpg_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/gpg_ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gregor.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gregor.go
index efc1bd8e..91dad283 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gregor.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gregor.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/gregor.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gregor_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gregor_ui.go
index b9824f86..2d155de1 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gregor_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/gregor_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/gregor_ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/home.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/home.go
index a5e84955..3614e816 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/home.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/home.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/home.avdl
package keybase1
@@ -435,7 +435,7 @@ func (o HomeScreenTodo) LegacyEmailVisibility() (res EmailAddress) {
func NewHomeScreenTodoWithVerifyAllPhoneNumber(v PhoneNumber) HomeScreenTodo {
return HomeScreenTodo{
- T__: HomeScreenTodoType_VERIFY_ALL_PHONE_NUMBER,
+ T__: HomeScreenTodoType_VERIFY_ALL_PHONE_NUMBER,
VerifyAllPhoneNumber__: &v,
}
}
@@ -449,7 +449,7 @@ func NewHomeScreenTodoWithVerifyAllEmail(v EmailAddress) HomeScreenTodo {
func NewHomeScreenTodoWithLegacyEmailVisibility(v EmailAddress) HomeScreenTodo {
return HomeScreenTodo{
- T__: HomeScreenTodoType_LEGACY_EMAIL_VISIBILITY,
+ T__: HomeScreenTodoType_LEGACY_EMAIL_VISIBILITY,
LegacyEmailVisibility__: &v,
}
}
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/home_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/home_ui.go
index 2039e02f..4c68eaa2 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/home_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/home_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/home_ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify.go
index 9ba6fe33..67a8724d 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/identify.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3.go
index 02a4e62e..8c9e1313 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/identify3.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3_common.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3_common.go
index e6062ead..3ef9c647 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3_common.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3_common.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/identify3_common.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3_ui.go
index a39ab91d..388cf465 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify3_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/identify3_ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify_common.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify_common.go
index 73822337..0b797c52 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify_common.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify_common.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/identify_common.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify_ui.go
index 7ddb4f2b..4fd29095 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/identify_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/identify_ui.avdl
package keybase1
@@ -357,13 +357,13 @@ func (o UserCard) DeepCopy() UserCard {
return UserCard{
UnverifiedNumFollowing: o.UnverifiedNumFollowing,
UnverifiedNumFollowers: o.UnverifiedNumFollowers,
- Uid: o.Uid.DeepCopy(),
- FullName: o.FullName,
- Location: o.Location,
- Bio: o.Bio,
- BioDecorated: o.BioDecorated,
- Website: o.Website,
- Twitter: o.Twitter,
+ Uid: o.Uid.DeepCopy(),
+ FullName: o.FullName,
+ Location: o.Location,
+ Bio: o.Bio,
+ BioDecorated: o.BioDecorated,
+ Website: o.Website,
+ Twitter: o.Twitter,
TeamShowcase: (func(x []UserTeamShowcase) []UserTeamShowcase {
if x == nil {
return nil
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/implicit_team_migration.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/implicit_team_migration.go
index d2d8ac04..209cde9f 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/implicit_team_migration.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/implicit_team_migration.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/implicit_team_migration.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/incoming-share.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/incoming-share.go
index 3e60c1f8..654ebeb4 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/incoming-share.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/incoming-share.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/incoming-share.avdl
package keybase1
@@ -96,3 +96,39 @@ func (o IncomingShareItem) DeepCopy() IncomingShareItem {
})(o.Content),
}
}
+
+type IncomingShareCompressPreference int
+
+const (
+ IncomingShareCompressPreference_ORIGINAL IncomingShareCompressPreference = 0
+ IncomingShareCompressPreference_COMPRESSED IncomingShareCompressPreference = 1
+)
+
+func (o IncomingShareCompressPreference) DeepCopy() IncomingShareCompressPreference { return o }
+
+var IncomingShareCompressPreferenceMap = map[string]IncomingShareCompressPreference{
+ "ORIGINAL": 0,
+ "COMPRESSED": 1,
+}
+
+var IncomingShareCompressPreferenceRevMap = map[IncomingShareCompressPreference]string{
+ 0: "ORIGINAL",
+ 1: "COMPRESSED",
+}
+
+func (e IncomingShareCompressPreference) String() string {
+ if v, ok := IncomingShareCompressPreferenceRevMap[e]; ok {
+ return v
+ }
+ return fmt.Sprintf("%v", int(e))
+}
+
+type IncomingSharePreference struct {
+ CompressPreference IncomingShareCompressPreference `codec:"compressPreference" json:"compressPreference"`
+}
+
+func (o IncomingSharePreference) DeepCopy() IncomingSharePreference {
+ return IncomingSharePreference{
+ CompressPreference: o.CompressPreference.DeepCopy(),
+ }
+}
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/install.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/install.go
index dee3b51b..d59897a8 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/install.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/install.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/install.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/invite_friends.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/invite_friends.go
index 91daf4f3..8995470d 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/invite_friends.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/invite_friends.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/invite_friends.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs.go
index 1826ca04..2edbf759 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/kbfs.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs_common.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs_common.go
index cfd05c43..5d1b2670 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs_common.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs_common.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/kbfs_common.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs_git.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs_git.go
index a24b13a6..67bed98d 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs_git.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfs_git.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/kbfs_git.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfsmount.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfsmount.go
index 05604a49..018f9a32 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfsmount.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kbfsmount.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/kbfsmount.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisionee.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisionee.go
index c2d4ff21..6f287772 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisionee.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisionee.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/kex2provisionee.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisionee2.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisionee2.go
index 02692579..b31e642f 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisionee2.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisionee2.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/kex2provisionee2.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisioner.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisioner.go
index a29589c4..5c0dfc14 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisioner.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kex2provisioner.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/kex2provisioner.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kvstore.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kvstore.go
index c2d04b54..d482edc1 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kvstore.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/kvstore.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/kvstore.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/log.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/log.go
index 44f91aad..bfa35db5 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/log.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/log.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/log.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/log_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/log_ui.go
index dff2d7b5..5cc81704 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/log_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/log_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/log_ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/login.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/login.go
index fdbf13dc..13e02d74 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/login.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/login.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/login.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/login_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/login_ui.go
index abfd087b..36e526f6 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/login_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/login_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/login_ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/logsend.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/logsend.go
index 36694758..57dd7568 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/logsend.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/logsend.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/logsend.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/merkle.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/merkle.go
index 33d20f25..4ae64364 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/merkle.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/merkle.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/merkle.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/merkle_store.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/merkle_store.go
index 87f71e4c..411e3d05 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/merkle_store.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/merkle_store.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/merkle_store.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/metadata.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/metadata.go
index 3505b2da..ae8656ae 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/metadata.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/metadata.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/metadata.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/metadata_update.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/metadata_update.go
index 2e1e3309..419778a3 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/metadata_update.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/metadata_update.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/metadata_update.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/network_stats.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/network_stats.go
index d5927026..f681f016 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/network_stats.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/network_stats.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/network_stats.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_app.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_app.go
index 10f23060..5a715837 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_app.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_app.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_app.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_audit.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_audit.go
index 73f81f34..f661e891 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_audit.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_audit.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_audit.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_badges.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_badges.go
index ef8ddfb1..645dbed4 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_badges.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_badges.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_badges.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_can_user_perform.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_can_user_perform.go
index 84bca814..da150ff5 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_can_user_perform.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_can_user_perform.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_can_user_perform.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_ctl.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_ctl.go
index 93a2901f..509a9f85 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_ctl.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_ctl.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_ctl.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_device_clone.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_device_clone.go
index ad626031..18a9b545 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_device_clone.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_device_clone.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_device_clone.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_email.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_email.go
index 377f114d..90d29cc5 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_email.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_email.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_email.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_ephemeral.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_ephemeral.go
index fc3800f7..fdd93e58 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_ephemeral.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_ephemeral.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_ephemeral.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_favorites.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_favorites.go
index 5b485a2a..ec4e9015 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_favorites.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_favorites.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_favorites.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_featuredbots.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_featuredbots.go
index 017b841a..8d0ea3d8 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_featuredbots.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_featuredbots.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_featuredbots.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_fs.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_fs.go
index 5c5e10c3..24b3b277 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_fs.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_fs.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_fs.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_fs_request.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_fs_request.go
index 886c1a18..e0a66b7b 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_fs_request.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_fs_request.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_fs_request.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_invite_friends.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_invite_friends.go
index 60914212..e8b1fa60 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_invite_friends.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_invite_friends.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_invite_friends.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_keyfamily.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_keyfamily.go
index b6784294..b4d52268 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_keyfamily.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_keyfamily.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_keyfamily.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_paperkey.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_paperkey.go
index 038eb907..c9ded150 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_paperkey.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_paperkey.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_paperkey.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_pgp.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_pgp.go
index ad418b0a..7b6afdb4 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_pgp.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_pgp.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_pgp.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_phone.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_phone.go
index c42b49a3..325beec6 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_phone.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_phone.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_phone.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_runtimestats.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_runtimestats.go
index d01dd4cd..534d1c53 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_runtimestats.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_runtimestats.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_runtimestats.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_saltpack.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_saltpack.go
index f1448660..5b56c50d 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_saltpack.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_saltpack.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_saltpack.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_service.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_service.go
index 478d7a52..8961879c 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_service.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_service.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_service.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_session.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_session.go
index c701d77c..cb506dcd 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_session.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_session.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_session.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_team.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_team.go
index 59866f99..e5f4f726 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_team.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_team.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_team.avdl
package keybase1
@@ -23,6 +23,35 @@ func (o TeamChangeSet) DeepCopy() TeamChangeSet {
}
}
+type TeamChangedSource int
+
+const (
+ TeamChangedSource_SERVER TeamChangedSource = 0
+ TeamChangedSource_LOCAL TeamChangedSource = 1
+ TeamChangedSource_LOCAL_RENAME TeamChangedSource = 2
+)
+
+func (o TeamChangedSource) DeepCopy() TeamChangedSource { return o }
+
+var TeamChangedSourceMap = map[string]TeamChangedSource{
+ "SERVER": 0,
+ "LOCAL": 1,
+ "LOCAL_RENAME": 2,
+}
+
+var TeamChangedSourceRevMap = map[TeamChangedSource]string{
+ 0: "SERVER",
+ 1: "LOCAL",
+ 2: "LOCAL_RENAME",
+}
+
+func (e TeamChangedSource) String() string {
+ if v, ok := TeamChangedSourceRevMap[e]; ok {
+ return v
+ }
+ return fmt.Sprintf("%v", int(e))
+}
+
type AvatarUpdateType int
const (
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_teambot.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_teambot.go
index 49bd516a..8e37da27 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_teambot.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_teambot.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_teambot.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_tracking.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_tracking.go
index 23917346..7964dc8d 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_tracking.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_tracking.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_tracking.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_users.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_users.go
index 5c16c324..e10a5f46 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_users.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/notify_users.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/notify_users.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/os.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/os.go
index 17d03699..be532312 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/os.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/os.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/os.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/paperprovision.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/paperprovision.go
index b6d86091..46159a71 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/paperprovision.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/paperprovision.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/paperprovision.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/passphrase_common.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/passphrase_common.go
index 083de1c9..a15b32c6 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/passphrase_common.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/passphrase_common.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/passphrase_common.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pgp.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pgp.go
index c8216451..6ecc3486 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pgp.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pgp.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/pgp.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pgp_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pgp_ui.go
index 8bf27832..e2294c4c 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pgp_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pgp_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/pgp_ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/phone_numbers.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/phone_numbers.go
index e2cd923b..050c08f9 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/phone_numbers.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/phone_numbers.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/phone_numbers.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pprof.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pprof.go
index ffad20a3..fdbb186b 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pprof.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/pprof.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/pprof.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/process.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/process.go
index 0591ef95..26554a51 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/process.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/process.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/process.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove.go
index 27bafb65..b10e4a93 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/prove.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove_common.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove_common.go
index 91402e46..9a2a59a7 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove_common.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove_common.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/prove_common.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove_ui.go
index be2fd8d9..0903e9b0 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/prove_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/prove_ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/provision_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/provision_ui.go
index 62b0e16b..1d455869 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/provision_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/provision_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/provision_ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/quota.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/quota.go
index f2f39022..2108f078 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/quota.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/quota.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/quota.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/reachability.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/reachability.go
index 1d5ff06a..8ff1c905 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/reachability.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/reachability.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/reachability.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/rekey.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/rekey.go
index 0f7ad939..226757e9 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/rekey.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/rekey.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/rekey.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/rekey_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/rekey_ui.go
index 5ea6fe8f..c412b593 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/rekey_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/rekey_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/rekey_ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/reset.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/reset.go
index f8491395..5c7b0de4 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/reset.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/reset.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/reset.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/revoke.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/revoke.go
index 234b117c..35acc4f3 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/revoke.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/revoke.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/revoke.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/saltpack.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/saltpack.go
index bc916ecc..cace194c 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/saltpack.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/saltpack.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/saltpack.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/saltpack_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/saltpack_ui.go
index f55be0b2..9f8292e1 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/saltpack_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/saltpack_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/saltpack_ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/scanproofs.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/scanproofs.go
index a1dbd027..c19281a6 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/scanproofs.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/scanproofs.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/scanproofs.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/secret_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/secret_ui.go
index 2c67abdf..dd03df11 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/secret_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/secret_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/secret_ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/secretkeys.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/secretkeys.go
index b977ab91..4b335c8c 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/secretkeys.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/secretkeys.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/secretkeys.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/selfprovision.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/selfprovision.go
index 42043ff5..61195472 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/selfprovision.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/selfprovision.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/selfprovision.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/session.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/session.go
index d094fb40..1f747164 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/session.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/session.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/session.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/signup.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/signup.go
index 84bca35c..d935a26b 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/signup.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/signup.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/signup.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/sigs.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/sigs.go
index 10153141..ab7cd597 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/sigs.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/sigs.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/sigs.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/simple_fs.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/simple_fs.go
index 2d96ad0a..fee60e92 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/simple_fs.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/simple_fs.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/simple_fs.avdl
package keybase1
@@ -752,9 +752,9 @@ type CopyArgs struct {
func (o CopyArgs) DeepCopy() CopyArgs {
return CopyArgs{
- OpID: o.OpID.DeepCopy(),
- Src: o.Src.DeepCopy(),
- Dest: o.Dest.DeepCopy(),
+ OpID: o.OpID.DeepCopy(),
+ Src: o.Src.DeepCopy(),
+ Dest: o.Dest.DeepCopy(),
OverwriteExistingFiles: o.OverwriteExistingFiles,
}
}
@@ -768,9 +768,9 @@ type MoveArgs struct {
func (o MoveArgs) DeepCopy() MoveArgs {
return MoveArgs{
- OpID: o.OpID.DeepCopy(),
- Src: o.Src.DeepCopy(),
- Dest: o.Dest.DeepCopy(),
+ OpID: o.OpID.DeepCopy(),
+ Src: o.Src.DeepCopy(),
+ Dest: o.Dest.DeepCopy(),
OverwriteExistingFiles: o.OverwriteExistingFiles,
}
}
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/stream_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/stream_ui.go
index 05cdfbc7..90859cd9 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/stream_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/stream_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/stream_ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teambot.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teambot.go
index 91b5d8df..7967b9a7 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teambot.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teambot.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/teambot.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teams.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teams.go
index 6321489f..665d3792 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teams.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teams.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/teams.avdl
package keybase1
@@ -501,6 +501,7 @@ type TeamMemberDetails struct {
NeedsPUK bool `codec:"needsPUK" json:"needsPUK"`
Status TeamMemberStatus `codec:"status" json:"status"`
JoinTime *Time `codec:"joinTime,omitempty" json:"joinTime,omitempty"`
+ Role TeamRole `codec:"role" json:"role"`
}
func (o TeamMemberDetails) DeepCopy() TeamMemberDetails {
@@ -517,6 +518,7 @@ func (o TeamMemberDetails) DeepCopy() TeamMemberDetails {
tmp := (*x).DeepCopy()
return &tmp
})(o.JoinTime),
+ Role: o.Role.DeepCopy(),
}
}
@@ -1764,29 +1766,49 @@ func (o TeamInvite) DeepCopy() TeamInvite {
}
type AnnotatedTeamInvite struct {
- InviteMetadata TeamInviteMetadata `codec:"inviteMetadata" json:"inviteMetadata"`
- DisplayName TeamInviteDisplayName `codec:"displayName" json:"displayName"`
- InviterUsername string `codec:"inviterUsername" json:"inviterUsername"`
- InviteeUv UserVersion `codec:"inviteeUv" json:"inviteeUv"`
- TeamName string `codec:"teamName" json:"teamName"`
- Status *TeamMemberStatus `codec:"status,omitempty" json:"status,omitempty"`
- AnnotatedUsedInvites []AnnotatedTeamUsedInviteLogPoint `codec:"annotatedUsedInvites" json:"annotatedUsedInvites"`
+ InviteMetadata TeamInviteMetadata `codec:"inviteMetadata" json:"inviteMetadata"`
+ DisplayName TeamInviteDisplayName `codec:"displayName" json:"displayName"`
+ InviterUsername string `codec:"inviterUsername" json:"inviterUsername"`
+ TeamName string `codec:"teamName" json:"teamName"`
+ IsValid bool `codec:"isValid" json:"isValid"`
+ ValidityDescription string `codec:"validityDescription" json:"validityDescription"`
+ InviteExt AnnotatedTeamInviteExt `codec:"inviteExt" json:"inviteExt"`
}
func (o AnnotatedTeamInvite) DeepCopy() AnnotatedTeamInvite {
return AnnotatedTeamInvite{
- InviteMetadata: o.InviteMetadata.DeepCopy(),
- DisplayName: o.DisplayName.DeepCopy(),
- InviterUsername: o.InviterUsername,
- InviteeUv: o.InviteeUv.DeepCopy(),
- TeamName: o.TeamName,
- Status: (func(x *TeamMemberStatus) *TeamMemberStatus {
- if x == nil {
- return nil
- }
- tmp := (*x).DeepCopy()
- return &tmp
- })(o.Status),
+ InviteMetadata: o.InviteMetadata.DeepCopy(),
+ DisplayName: o.DisplayName.DeepCopy(),
+ InviterUsername: o.InviterUsername,
+ TeamName: o.TeamName,
+ IsValid: o.IsValid,
+ ValidityDescription: o.ValidityDescription,
+ InviteExt: o.InviteExt.DeepCopy(),
+ }
+}
+
+type KeybaseInviteExt struct {
+ InviteeUv UserVersion `codec:"inviteeUv" json:"inviteeUv"`
+ Status TeamMemberStatus `codec:"status" json:"status"`
+ FullName FullName `codec:"fullName" json:"fullName"`
+ Username string `codec:"username" json:"username"`
+}
+
+func (o KeybaseInviteExt) DeepCopy() KeybaseInviteExt {
+ return KeybaseInviteExt{
+ InviteeUv: o.InviteeUv.DeepCopy(),
+ Status: o.Status.DeepCopy(),
+ FullName: o.FullName.DeepCopy(),
+ Username: o.Username,
+ }
+}
+
+type InvitelinkInviteExt struct {
+ AnnotatedUsedInvites []AnnotatedTeamUsedInviteLogPoint `codec:"annotatedUsedInvites" json:"annotatedUsedInvites"`
+}
+
+func (o InvitelinkInviteExt) DeepCopy() InvitelinkInviteExt {
+ return InvitelinkInviteExt{
AnnotatedUsedInvites: (func(x []AnnotatedTeamUsedInviteLogPoint) []AnnotatedTeamUsedInviteLogPoint {
if x == nil {
return nil
@@ -1801,6 +1823,88 @@ func (o AnnotatedTeamInvite) DeepCopy() AnnotatedTeamInvite {
}
}
+type AnnotatedTeamInviteExt struct {
+ C__ TeamInviteCategory `codec:"c" json:"c"`
+ Keybase__ *KeybaseInviteExt `codec:"keybase,omitempty" json:"keybase,omitempty"`
+ Invitelink__ *InvitelinkInviteExt `codec:"invitelink,omitempty" json:"invitelink,omitempty"`
+}
+
+func (o *AnnotatedTeamInviteExt) C() (ret TeamInviteCategory, err error) {
+ switch o.C__ {
+ case TeamInviteCategory_KEYBASE:
+ if o.Keybase__ == nil {
+ err = errors.New("unexpected nil value for Keybase__")
+ return ret, err
+ }
+ case TeamInviteCategory_INVITELINK:
+ if o.Invitelink__ == nil {
+ err = errors.New("unexpected nil value for Invitelink__")
+ return ret, err
+ }
+ }
+ return o.C__, nil
+}
+
+func (o AnnotatedTeamInviteExt) Keybase() (res KeybaseInviteExt) {
+ if o.C__ != TeamInviteCategory_KEYBASE {
+ panic("wrong case accessed")
+ }
+ if o.Keybase__ == nil {
+ return
+ }
+ return *o.Keybase__
+}
+
+func (o AnnotatedTeamInviteExt) Invitelink() (res InvitelinkInviteExt) {
+ if o.C__ != TeamInviteCategory_INVITELINK {
+ panic("wrong case accessed")
+ }
+ if o.Invitelink__ == nil {
+ return
+ }
+ return *o.Invitelink__
+}
+
+func NewAnnotatedTeamInviteExtWithKeybase(v KeybaseInviteExt) AnnotatedTeamInviteExt {
+ return AnnotatedTeamInviteExt{
+ C__: TeamInviteCategory_KEYBASE,
+ Keybase__: &v,
+ }
+}
+
+func NewAnnotatedTeamInviteExtWithInvitelink(v InvitelinkInviteExt) AnnotatedTeamInviteExt {
+ return AnnotatedTeamInviteExt{
+ C__: TeamInviteCategory_INVITELINK,
+ Invitelink__: &v,
+ }
+}
+
+func NewAnnotatedTeamInviteExtDefault(c TeamInviteCategory) AnnotatedTeamInviteExt {
+ return AnnotatedTeamInviteExt{
+ C__: c,
+ }
+}
+
+func (o AnnotatedTeamInviteExt) DeepCopy() AnnotatedTeamInviteExt {
+ return AnnotatedTeamInviteExt{
+ C__: o.C__.DeepCopy(),
+ Keybase__: (func(x *KeybaseInviteExt) *KeybaseInviteExt {
+ if x == nil {
+ return nil
+ }
+ tmp := (*x).DeepCopy()
+ return &tmp
+ })(o.Keybase__),
+ Invitelink__: (func(x *InvitelinkInviteExt) *InvitelinkInviteExt {
+ if x == nil {
+ return nil
+ }
+ tmp := (*x).DeepCopy()
+ return &tmp
+ })(o.Invitelink__),
+ }
+}
+
type TeamEncryptedKBFSKeyset struct {
V int `codec:"v" json:"v"`
E []byte `codec:"e" json:"e"`
@@ -3244,8 +3348,7 @@ func (o AnnotatedMemberInfo) DeepCopy() AnnotatedMemberInfo {
}
type AnnotatedTeamList struct {
- Teams []AnnotatedMemberInfo `codec:"teams" json:"teams"`
- AnnotatedActiveInvites map[TeamInviteID]AnnotatedTeamInvite `codec:"annotatedActiveInvites" json:"annotatedActiveInvites"`
+ Teams []AnnotatedMemberInfo `codec:"teams" json:"teams"`
}
func (o AnnotatedTeamList) DeepCopy() AnnotatedTeamList {
@@ -3261,18 +3364,6 @@ func (o AnnotatedTeamList) DeepCopy() AnnotatedTeamList {
}
return ret
})(o.Teams),
- AnnotatedActiveInvites: (func(x map[TeamInviteID]AnnotatedTeamInvite) map[TeamInviteID]AnnotatedTeamInvite {
- if x == nil {
- return nil
- }
- ret := make(map[TeamInviteID]AnnotatedTeamInvite, len(x))
- for k, v := range x {
- kCopy := k.DeepCopy()
- vCopy := v.DeepCopy()
- ret[kCopy] = vCopy
- }
- return ret
- })(o.AnnotatedActiveInvites),
}
}
@@ -3549,7 +3640,7 @@ type TeamCreateFancyInfo struct {
Description string `codec:"description" json:"description"`
JoinSubteam bool `codec:"joinSubteam" json:"joinSubteam"`
OpenSettings TeamSettings `codec:"openSettings" json:"openSettings"`
- Showcase bool `codec:"showcase" json:"showcase"`
+ ProfileShowcase bool `codec:"profileShowcase" json:"profileShowcase"`
Avatar *TeamAvatar `codec:"avatar,omitempty" json:"avatar,omitempty"`
ChatChannels []string `codec:"chatChannels" json:"chatChannels"`
Subteams []string `codec:"subteams" json:"subteams"`
@@ -3559,11 +3650,11 @@ type TeamCreateFancyInfo struct {
func (o TeamCreateFancyInfo) DeepCopy() TeamCreateFancyInfo {
return TeamCreateFancyInfo{
- Name: o.Name,
- Description: o.Description,
- JoinSubteam: o.JoinSubteam,
- OpenSettings: o.OpenSettings.DeepCopy(),
- Showcase: o.Showcase,
+ Name: o.Name,
+ Description: o.Description,
+ JoinSubteam: o.JoinSubteam,
+ OpenSettings: o.OpenSettings.DeepCopy(),
+ ProfileShowcase: o.ProfileShowcase,
Avatar: (func(x *TeamAvatar) *TeamAvatar {
if x == nil {
return nil
@@ -4210,40 +4301,29 @@ func (o UserTeamVersionUpdate) DeepCopy() UserTeamVersionUpdate {
}
}
-type AnnotatedTeamMemberDetails struct {
- Details TeamMemberDetails `codec:"details" json:"details"`
- Role TeamRole `codec:"role" json:"role"`
-}
-
-func (o AnnotatedTeamMemberDetails) DeepCopy() AnnotatedTeamMemberDetails {
- return AnnotatedTeamMemberDetails{
- Details: o.Details.DeepCopy(),
- Role: o.Role.DeepCopy(),
- }
-}
-
type AnnotatedTeam struct {
- TeamID TeamID `codec:"teamID" json:"teamID"`
- Name string `codec:"name" json:"name"`
- TransitiveSubteamsUnverified SubteamListResult `codec:"transitiveSubteamsUnverified" json:"transitiveSubteamsUnverified"`
- Members []AnnotatedTeamMemberDetails `codec:"members" json:"members"`
- Invites []AnnotatedTeamInvite `codec:"invites" json:"invites"`
- JoinRequests []TeamJoinRequest `codec:"joinRequests" json:"joinRequests"`
- TarsDisabled bool `codec:"tarsDisabled" json:"tarsDisabled"`
- Settings TeamSettings `codec:"settings" json:"settings"`
- Showcase TeamShowcase `codec:"showcase" json:"showcase"`
+ TeamID TeamID `codec:"teamID" json:"teamID"`
+ Name string `codec:"name" json:"name"`
+ TransitiveSubteamsUnverified SubteamListResult `codec:"transitiveSubteamsUnverified" json:"transitiveSubteamsUnverified"`
+ Members []TeamMemberDetails `codec:"members" json:"members"`
+ Invites []AnnotatedTeamInvite `codec:"invites" json:"invites"`
+ Settings TeamSettings `codec:"settings" json:"settings"`
+ KeyGeneration PerTeamKeyGeneration `codec:"keyGeneration" json:"keyGeneration"`
+ Showcase TeamShowcase `codec:"showcase" json:"showcase"`
+ JoinRequests []TeamJoinRequest `codec:"joinRequests" json:"joinRequests"`
+ TarsDisabled bool `codec:"tarsDisabled" json:"tarsDisabled"`
}
func (o AnnotatedTeam) DeepCopy() AnnotatedTeam {
return AnnotatedTeam{
- TeamID: o.TeamID.DeepCopy(),
- Name: o.Name,
+ TeamID: o.TeamID.DeepCopy(),
+ Name: o.Name,
TransitiveSubteamsUnverified: o.TransitiveSubteamsUnverified.DeepCopy(),
- Members: (func(x []AnnotatedTeamMemberDetails) []AnnotatedTeamMemberDetails {
+ Members: (func(x []TeamMemberDetails) []TeamMemberDetails {
if x == nil {
return nil
}
- ret := make([]AnnotatedTeamMemberDetails, len(x))
+ ret := make([]TeamMemberDetails, len(x))
for i, v := range x {
vCopy := v.DeepCopy()
ret[i] = vCopy
@@ -4261,6 +4341,9 @@ func (o AnnotatedTeam) DeepCopy() AnnotatedTeam {
}
return ret
})(o.Invites),
+ Settings: o.Settings.DeepCopy(),
+ KeyGeneration: o.KeyGeneration.DeepCopy(),
+ Showcase: o.Showcase.DeepCopy(),
JoinRequests: (func(x []TeamJoinRequest) []TeamJoinRequest {
if x == nil {
return nil
@@ -4273,8 +4356,6 @@ func (o AnnotatedTeam) DeepCopy() AnnotatedTeam {
return ret
})(o.JoinRequests),
TarsDisabled: o.TarsDisabled,
- Settings: o.Settings.DeepCopy(),
- Showcase: o.Showcase.DeepCopy(),
}
}
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teams_ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teams_ui.go
index 76e51033..bfb2f35a 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teams_ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teams_ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/teams_ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teamsearch.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teamsearch.go
index 2cf5ab7e..836c3652 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teamsearch.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/teamsearch.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/teamsearch.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/test.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/test.go
index e8944f06..492ca36b 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/test.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/test.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/test.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/tlf.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/tlf.go
index e6b00761..ee803559 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/tlf.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/tlf.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/tlf.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/tlf_keys.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/tlf_keys.go
index 02c74db4..63f6d939 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/tlf_keys.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/tlf_keys.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/tlf_keys.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/track.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/track.go
index e1e3368b..e46604df 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/track.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/track.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/track.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ui.go
index f86a263b..5dc78cd0 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/ui.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/upk.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/upk.go
index 134ee85b..58615c80 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/upk.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/upk.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/upk.avdl
package keybase1
@@ -127,8 +127,8 @@ func (o SignatureMetadata) DeepCopy() SignatureMetadata {
SigningKID: o.SigningKID.DeepCopy(),
PrevMerkleRootSigned: o.PrevMerkleRootSigned.DeepCopy(),
FirstAppearedUnverified: o.FirstAppearedUnverified.DeepCopy(),
- Time: o.Time.DeepCopy(),
- SigChainLocation: o.SigChainLocation.DeepCopy(),
+ Time: o.Time.DeepCopy(),
+ SigChainLocation: o.SigChainLocation.DeepCopy(),
}
}
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/user.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/user.go
index bd1cde4d..ececc0d9 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/user.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/user.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/user.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/usersearch.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/usersearch.go
index cf492935..b0fd45f6 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/usersearch.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/usersearch.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/usersearch.avdl
package keybase1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/wot.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/wot.go
index 694d13b5..d9eb577b 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/wot.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/keybase1/wot.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/keybase1/wot.avdl
package keybase1
@@ -33,6 +33,42 @@ func (o WotProof) DeepCopy() WotProof {
}
}
+type WotProofUI struct {
+ Type string `codec:"type" json:"type"`
+ Value string `codec:"value" json:"value"`
+ SiteIcon []SizedImage `codec:"siteIcon" json:"siteIcon"`
+ SiteIconDarkmode []SizedImage `codec:"siteIconDarkmode" json:"siteIconDarkmode"`
+}
+
+func (o WotProofUI) DeepCopy() WotProofUI {
+ return WotProofUI{
+ Type: o.Type,
+ Value: o.Value,
+ SiteIcon: (func(x []SizedImage) []SizedImage {
+ if x == nil {
+ return nil
+ }
+ ret := make([]SizedImage, len(x))
+ for i, v := range x {
+ vCopy := v.DeepCopy()
+ ret[i] = vCopy
+ }
+ return ret
+ })(o.SiteIcon),
+ SiteIconDarkmode: (func(x []SizedImage) []SizedImage {
+ if x == nil {
+ return nil
+ }
+ ret := make([]SizedImage, len(x))
+ for i, v := range x {
+ vCopy := v.DeepCopy()
+ ret[i] = vCopy
+ }
+ return ret
+ })(o.SiteIconDarkmode),
+ }
+}
+
type Confidence struct {
UsernameVerifiedVia UsernameVerificationType `codec:"usernameVerifiedVia" json:"username_verified_via,omitempty"`
Proofs []WotProof `codec:"proofs" json:"proofs,omitempty"`
@@ -60,20 +96,20 @@ func (o Confidence) DeepCopy() Confidence {
type WotReactionType int
const (
- WotReactionType_ACCEPT WotReactionType = 0
- WotReactionType_REJECT WotReactionType = 1
+ WotReactionType_REJECT WotReactionType = 0
+ WotReactionType_ACCEPT WotReactionType = 1
)
func (o WotReactionType) DeepCopy() WotReactionType { return o }
var WotReactionTypeMap = map[string]WotReactionType{
- "ACCEPT": 0,
- "REJECT": 1,
+ "REJECT": 0,
+ "ACCEPT": 1,
}
var WotReactionTypeRevMap = map[WotReactionType]string{
- 0: "ACCEPT",
- 1: "REJECT",
+ 0: "REJECT",
+ 1: "ACCEPT",
}
func (e WotReactionType) String() string {
@@ -92,7 +128,8 @@ type WotVouch struct {
VoucherUsername string `codec:"voucherUsername" json:"voucherUsername"`
VouchText string `codec:"vouchText" json:"vouchText"`
VouchedAt Time `codec:"vouchedAt" json:"vouchedAt"`
- Confidence *Confidence `codec:"confidence,omitempty" json:"confidence,omitempty"`
+ Confidence Confidence `codec:"confidence" json:"confidence"`
+ Proofs []WotProofUI `codec:"proofs" json:"proofs"`
}
func (o WotVouch) DeepCopy() WotVouch {
@@ -105,12 +142,17 @@ func (o WotVouch) DeepCopy() WotVouch {
VoucherUsername: o.VoucherUsername,
VouchText: o.VouchText,
VouchedAt: o.VouchedAt.DeepCopy(),
- Confidence: (func(x *Confidence) *Confidence {
+ Confidence: o.Confidence.DeepCopy(),
+ Proofs: (func(x []WotProofUI) []WotProofUI {
if x == nil {
return nil
}
- tmp := (*x).DeepCopy()
- return &tmp
- })(o.Confidence),
+ ret := make([]WotProofUI, len(x))
+ for i, v := range x {
+ vCopy := v.DeepCopy()
+ ret[i] = vCopy
+ }
+ return ret
+ })(o.Proofs),
}
}
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/bundle.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/bundle.go
index ab08a284..3aa3790e 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/bundle.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/bundle.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/stellar1/bundle.avdl
package stellar1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/common.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/common.go
index 03ddc409..ce875a21 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/common.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/common.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/stellar1/common.avdl
package stellar1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/gregor.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/gregor.go
index 0928f03d..86df4920 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/gregor.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/gregor.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/stellar1/gregor.avdl
package stellar1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/local.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/local.go
index fb858852..c1a82c0f 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/local.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/local.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/stellar1/local.avdl
package stellar1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/notify.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/notify.go
index ef8e4b11..75bde803 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/notify.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/notify.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/stellar1/notify.avdl
package stellar1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/remote.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/remote.go
index 0ef09fba..dd58f47e 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/remote.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/remote.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/stellar1/remote.avdl
package stellar1
diff --git a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/ui.go b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/ui.go
index dfb0d7c5..ed41ada6 100644
--- a/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/ui.go
+++ b/vendor/github.com/keybase/go-keybase-chat-bot/kbchat/types/stellar1/ui.go
@@ -1,4 +1,4 @@
-// Auto-generated to Go types using avdl-compiler v1.4.8 (https://github.com/keybase/node-avdl-compiler)
+// Auto-generated to Go types using avdl-compiler v1.4.10 (https://github.com/keybase/node-avdl-compiler)
// Input file: ../client/protocol/avdl/stellar1/ui.avdl
package stellar1
diff --git a/vendor/github.com/labstack/echo/v4/CHANGELOG.md b/vendor/github.com/labstack/echo/v4/CHANGELOG.md
index e8f42200..8b71fb8e 100644
--- a/vendor/github.com/labstack/echo/v4/CHANGELOG.md
+++ b/vendor/github.com/labstack/echo/v4/CHANGELOG.md
@@ -1,5 +1,19 @@
# Changelog
+## v4.9.1 - 2022-10-12
+
+**Fixes**
+
+* Fix logger panicing (when template is set to empty) by bumping dependency version [#2295](https://github.com/labstack/echo/issues/2295)
+
+**Enhancements**
+
+* Improve CORS documentation [#2272](https://github.com/labstack/echo/pull/2272)
+* Update readme about supported Go versions [#2291](https://github.com/labstack/echo/pull/2291)
+* Tests: improve error handling on closing body [#2254](https://github.com/labstack/echo/pull/2254)
+* Tests: refactor some of the assertions in tests [#2275](https://github.com/labstack/echo/pull/2275)
+* Tests: refactor assertions [#2301](https://github.com/labstack/echo/pull/2301)
+
## v4.9.0 - 2022-09-04
**Security**
diff --git a/vendor/github.com/labstack/echo/v4/README.md b/vendor/github.com/labstack/echo/v4/README.md
index 17e6ed93..509b9735 100644
--- a/vendor/github.com/labstack/echo/v4/README.md
+++ b/vendor/github.com/labstack/echo/v4/README.md
@@ -11,12 +11,11 @@
## Supported Go versions
+Latest version of Echo supports last four Go major [releases](https://go.dev/doc/devel/release) and might work with older versions.
+
As of version 4.0.0, Echo is available as a [Go module](https://github.com/golang/go/wiki/Modules).
Therefore a Go version capable of understanding /vN suffixed imports is required:
-- 1.9.7+
-- 1.10.3+
-- 1.14+
Any of these versions will allow you to import Echo as `github.com/labstack/echo/v4` which is the recommended
way of using Echo going forward.
diff --git a/vendor/github.com/labstack/echo/v4/context.go b/vendor/github.com/labstack/echo/v4/context.go
index a4ecfadf..5567100b 100644
--- a/vendor/github.com/labstack/echo/v4/context.go
+++ b/vendor/github.com/labstack/echo/v4/context.go
@@ -181,7 +181,7 @@ type (
// Logger returns the `Logger` instance.
Logger() Logger
- // Set the logger
+ // SetLogger Set the logger
SetLogger(l Logger)
// Echo returns the `Echo` instance.
diff --git a/vendor/github.com/labstack/echo/v4/middleware/cors.go b/vendor/github.com/labstack/echo/v4/middleware/cors.go
index 16259512..25cf983a 100644
--- a/vendor/github.com/labstack/echo/v4/middleware/cors.go
+++ b/vendor/github.com/labstack/echo/v4/middleware/cors.go
@@ -15,46 +15,85 @@ type (
// Skipper defines a function to skip middleware.
Skipper Skipper
- // AllowOrigin defines a list of origins that may access the resource.
+ // AllowOrigins determines the value of the Access-Control-Allow-Origin
+ // response header. This header defines a list of origins that may access the
+ // resource. The wildcard characters '*' and '?' are supported and are
+ // converted to regex fragments '.*' and '.' accordingly.
+ //
+ // Security: use extreme caution when handling the origin, and carefully
+ // validate any logic. Remember that attackers may register hostile domain names.
+ // See https://blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.html
+ //
// Optional. Default value []string{"*"}.
+ //
+ // See also: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin
AllowOrigins []string `yaml:"allow_origins"`
// AllowOriginFunc is a custom function to validate the origin. It takes the
// origin as an argument and returns true if allowed or false otherwise. If
// an error is returned, it is returned by the handler. If this option is
// set, AllowOrigins is ignored.
+ //
+ // Security: use extreme caution when handling the origin, and carefully
+ // validate any logic. Remember that attackers may register hostile domain names.
+ // See https://blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.html
+ //
// Optional.
AllowOriginFunc func(origin string) (bool, error) `yaml:"allow_origin_func"`
- // AllowMethods defines a list methods allowed when accessing the resource.
- // This is used in response to a preflight request.
+ // AllowMethods determines the value of the Access-Control-Allow-Methods
+ // response header. This header specified the list of methods allowed when
+ // accessing the resource. This is used in response to a preflight request.
+ //
// Optional. Default value DefaultCORSConfig.AllowMethods.
- // If `allowMethods` is left empty will fill for preflight request `Access-Control-Allow-Methods` header value
+ // If `allowMethods` is left empty, this middleware will fill for preflight
+ // request `Access-Control-Allow-Methods` header value
// from `Allow` header that echo.Router set into context.
+ //
+ // See also: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Methods
AllowMethods []string `yaml:"allow_methods"`
- // AllowHeaders defines a list of request headers that can be used when
- // making the actual request. This is in response to a preflight request.
+ // AllowHeaders determines the value of the Access-Control-Allow-Headers
+ // response header. This header is used in response to a preflight request to
+ // indicate which HTTP headers can be used when making the actual request.
+ //
// Optional. Default value []string{}.
+ //
+ // See also: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Headers
AllowHeaders []string `yaml:"allow_headers"`
- // AllowCredentials indicates whether or not the response to the request
- // can be exposed when the credentials flag is true. When used as part of
- // a response to a preflight request, this indicates whether or not the
- // actual request can be made using credentials.
- // Optional. Default value false.
+ // AllowCredentials determines the value of the
+ // Access-Control-Allow-Credentials response header. This header indicates
+ // whether or not the response to the request can be exposed when the
+ // credentials mode (Request.credentials) is true. When used as part of a
+ // response to a preflight request, this indicates whether or not the actual
+ // request can be made using credentials. See also
+ // [MDN: Access-Control-Allow-Credentials].
+ //
+ // Optional. Default value false, in which case the header is not set.
+ //
// Security: avoid using `AllowCredentials = true` with `AllowOrigins = *`.
- // See http://blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.html
+ // See "Exploiting CORS misconfigurations for Bitcoins and bounties",
+ // https://blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.html
+ //
+ // See also: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Credentials
AllowCredentials bool `yaml:"allow_credentials"`
- // ExposeHeaders defines a whitelist headers that clients are allowed to
- // access.
- // Optional. Default value []string{}.
+ // ExposeHeaders determines the value of Access-Control-Expose-Headers, which
+ // defines a list of headers that clients are allowed to access.
+ //
+ // Optional. Default value []string{}, in which case the header is not set.
+ //
+ // See also: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Expose-Header
ExposeHeaders []string `yaml:"expose_headers"`
- // MaxAge indicates how long (in seconds) the results of a preflight request
- // can be cached.
- // Optional. Default value 0.
+ // MaxAge determines the value of the Access-Control-Max-Age response header.
+ // This header indicates how long (in seconds) the results of a preflight
+ // request can be cached.
+ //
+ // Optional. Default value 0. The header is set only if MaxAge > 0.
+ //
+ // See also: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Max-Age
MaxAge int `yaml:"max_age"`
}
)
@@ -69,13 +108,22 @@ var (
)
// CORS returns a Cross-Origin Resource Sharing (CORS) middleware.
-// See: https://developer.mozilla.org/en/docs/Web/HTTP/Access_control_CORS
+// See also [MDN: Cross-Origin Resource Sharing (CORS)].
+//
+// Security: Poorly configured CORS can compromise security because it allows
+// relaxation of the browser's Same-Origin policy. See [Exploiting CORS
+// misconfigurations for Bitcoins and bounties] and [Portswigger: Cross-origin
+// resource sharing (CORS)] for more details.
+//
+// [MDN: Cross-Origin Resource Sharing (CORS)]: https://developer.mozilla.org/en/docs/Web/HTTP/Access_control_CORS
+// [Exploiting CORS misconfigurations for Bitcoins and bounties]: https://blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.html
+// [Portswigger: Cross-origin resource sharing (CORS)]: https://portswigger.net/web-security/cors
func CORS() echo.MiddlewareFunc {
return CORSWithConfig(DefaultCORSConfig)
}
// CORSWithConfig returns a CORS middleware with config.
-// See: `CORS()`.
+// See: [CORS].
func CORSWithConfig(config CORSConfig) echo.MiddlewareFunc {
// Defaults
if config.Skipper == nil {
diff --git a/vendor/github.com/labstack/gommon/bytes/bytes.go b/vendor/github.com/labstack/gommon/bytes/bytes.go
index 2f6bcec6..b07e31cd 100644
--- a/vendor/github.com/labstack/gommon/bytes/bytes.go
+++ b/vendor/github.com/labstack/gommon/bytes/bytes.go
@@ -12,19 +12,31 @@ type (
Bytes struct{}
)
+// binary units (IEC 60027)
const (
_ = 1.0 << (10 * iota) // ignore first value by assigning to blank identifier
- KB
- MB
- GB
- TB
- PB
- EB
+ KiB
+ MiB
+ GiB
+ TiB
+ PiB
+ EiB
+)
+
+// decimal units (SI international system of units)
+const (
+ KB = 1000
+ MB = KB * 1000
+ GB = MB * 1000
+ TB = GB * 1000
+ PB = TB * 1000
+ EB = PB * 1000
)
var (
- pattern = regexp.MustCompile(`(?i)^(-?\d+(?:\.\d+)?)\s?([KMGTPE]B?|B?)$`)
- global = New()
+ patternBinary = regexp.MustCompile(`(?i)^(-?\d+(?:\.\d+)?)\s?([KMGTPE]iB?)$`)
+ patternDecimal = regexp.MustCompile(`(?i)^(-?\d+(?:\.\d+)?)\s?([KMGTPE]B?|B?)$`)
+ global = New()
)
// New creates a Bytes instance.
@@ -32,44 +44,97 @@ func New() *Bytes {
return &Bytes{}
}
-// Format formats bytes integer to human readable string.
+// Format formats bytes integer to human readable string according to IEC 60027.
+// For example, 31323 bytes will return 30.59KB.
+func (b *Bytes) Format(value int64) string {
+ return b.FormatBinary(value)
+}
+
+// FormatBinary formats bytes integer to human readable string according to IEC 60027.
// For example, 31323 bytes will return 30.59KB.
-func (*Bytes) Format(b int64) string {
+func (*Bytes) FormatBinary(value int64) string {
+ multiple := ""
+ val := float64(value)
+
+ switch {
+ case value >= EiB:
+ val /= EiB
+ multiple = "EiB"
+ case value >= PiB:
+ val /= PiB
+ multiple = "PiB"
+ case value >= TiB:
+ val /= TiB
+ multiple = "TiB"
+ case value >= GiB:
+ val /= GiB
+ multiple = "GiB"
+ case value >= MiB:
+ val /= MiB
+ multiple = "MiB"
+ case value >= KiB:
+ val /= KiB
+ multiple = "KiB"
+ case value == 0:
+ return "0"
+ default:
+ return strconv.FormatInt(value, 10) + "B"
+ }
+
+ return fmt.Sprintf("%.2f%s", val, multiple)
+}
+
+// FormatDecimal formats bytes integer to human readable string according to SI international system of units.
+// For example, 31323 bytes will return 31.32KB.
+func (*Bytes) FormatDecimal(value int64) string {
multiple := ""
- value := float64(b)
+ val := float64(value)
switch {
- case b >= EB:
- value /= EB
+ case value >= EB:
+ val /= EB
multiple = "EB"
- case b >= PB:
- value /= PB
+ case value >= PB:
+ val /= PB
multiple = "PB"
- case b >= TB:
- value /= TB
+ case value >= TB:
+ val /= TB
multiple = "TB"
- case b >= GB:
- value /= GB
+ case value >= GB:
+ val /= GB
multiple = "GB"
- case b >= MB:
- value /= MB
+ case value >= MB:
+ val /= MB
multiple = "MB"
- case b >= KB:
- value /= KB
+ case value >= KB:
+ val /= KB
multiple = "KB"
- case b == 0:
+ case value == 0:
return "0"
default:
- return strconv.FormatInt(b, 10) + "B"
+ return strconv.FormatInt(value, 10) + "B"
}
- return fmt.Sprintf("%.2f%s", value, multiple)
+ return fmt.Sprintf("%.2f%s", val, multiple)
}
// Parse parses human readable bytes string to bytes integer.
-// For example, 6GB (6G is also valid) will return 6442450944.
-func (*Bytes) Parse(value string) (i int64, err error) {
- parts := pattern.FindStringSubmatch(value)
+// For example, 6GiB (6Gi is also valid) will return 6442450944, and
+// 6GB (6G is also valid) will return 6000000000.
+func (b *Bytes) Parse(value string) (int64, error) {
+
+ i, err := b.ParseBinary(value)
+ if err == nil {
+ return i, err
+ }
+
+ return b.ParseDecimal(value)
+}
+
+// ParseBinary parses human readable bytes string to bytes integer.
+// For example, 6GiB (6Gi is also valid) will return 6442450944.
+func (*Bytes) ParseBinary(value string) (i int64, err error) {
+ parts := patternBinary.FindStringSubmatch(value)
if len(parts) < 3 {
return 0, fmt.Errorf("error parsing value=%s", value)
}
@@ -81,8 +146,38 @@ func (*Bytes) Parse(value string) (i int64, err error) {
}
switch multiple {
+ case "KI", "KIB":
+ return int64(bytes * KiB), nil
+ case "MI", "MIB":
+ return int64(bytes * MiB), nil
+ case "GI", "GIB":
+ return int64(bytes * GiB), nil
+ case "TI", "TIB":
+ return int64(bytes * TiB), nil
+ case "PI", "PIB":
+ return int64(bytes * PiB), nil
+ case "EI", "EIB":
+ return int64(bytes * EiB), nil
default:
return int64(bytes), nil
+ }
+}
+
+// ParseDecimal parses human readable bytes string to bytes integer.
+// For example, 6GB (6G is also valid) will return 6000000000.
+func (*Bytes) ParseDecimal(value string) (i int64, err error) {
+ parts := patternDecimal.FindStringSubmatch(value)
+ if len(parts) < 3 {
+ return 0, fmt.Errorf("error parsing value=%s", value)
+ }
+ bytesString := parts[1]
+ multiple := strings.ToUpper(parts[2])
+ bytes, err := strconv.ParseFloat(bytesString, 64)
+ if err != nil {
+ return
+ }
+
+ switch multiple {
case "K", "KB":
return int64(bytes * KB), nil
case "M", "MB":
@@ -95,15 +190,27 @@ func (*Bytes) Parse(value string) (i int64, err error) {
return int64(bytes * PB), nil
case "E", "EB":
return int64(bytes * EB), nil
+ default:
+ return int64(bytes), nil
}
}
// Format wraps global Bytes's Format function.
-func Format(b int64) string {
- return global.Format(b)
+func Format(value int64) string {
+ return global.Format(value)
+}
+
+// FormatBinary wraps global Bytes's FormatBinary function.
+func FormatBinary(value int64) string {
+ return global.FormatBinary(value)
+}
+
+// FormatDecimal wraps global Bytes's FormatDecimal function.
+func FormatDecimal(value int64) string {
+ return global.FormatDecimal(value)
}
// Parse wraps global Bytes's Parse function.
-func Parse(val string) (int64, error) {
- return global.Parse(val)
+func Parse(value string) (int64, error) {
+ return global.Parse(value)
}
diff --git a/vendor/github.com/labstack/gommon/log/log.go b/vendor/github.com/labstack/gommon/log/log.go
index 06fa37e0..25f719aa 100644
--- a/vendor/github.com/labstack/gommon/log/log.go
+++ b/vendor/github.com/labstack/gommon/log/log.go
@@ -391,7 +391,7 @@ func (l *Logger) log(level Lvl, format string, args ...interface{}) {
if err == nil {
s := buf.String()
i := buf.Len() - 1
- if s[i] == '}' {
+ if i >= 0 && s[i] == '}' {
// JSON header
buf.Truncate(i)
buf.WriteByte(',')
@@ -404,7 +404,9 @@ func (l *Logger) log(level Lvl, format string, args ...interface{}) {
}
} else {
// Text header
- buf.WriteByte(' ')
+ if len(s) > 0 {
+ buf.WriteByte(' ')
+ }
buf.WriteString(message)
}
buf.WriteByte('\n')
diff --git a/vendor/github.com/slack-go/slack/dialog_text.go b/vendor/github.com/slack-go/slack/dialog_text.go
index da06bd6d..25fa1b69 100644
--- a/vendor/github.com/slack-go/slack/dialog_text.go
+++ b/vendor/github.com/slack-go/slack/dialog_text.go
@@ -18,7 +18,7 @@ const (
)
// TextInputElement subtype of DialogInput
-// https://api.slack.com/dialogs#option_element_attributes#text_element_attributes
+// https://api.slack.com/dialogs#option_element_attributes#text_element_attributes
type TextInputElement struct {
DialogInput
MaxLength int `json:"max_length,omitempty"`
diff --git a/vendor/github.com/slack-go/slack/files.go b/vendor/github.com/slack-go/slack/files.go
index e7e71c49..e7cfe1fe 100644
--- a/vendor/github.com/slack-go/slack/files.go
+++ b/vendor/github.com/slack-go/slack/files.go
@@ -299,7 +299,7 @@ func (api *Client) UploadFile(params FileUploadParameters) (file *File, err erro
func (api *Client) UploadFileContext(ctx context.Context, params FileUploadParameters) (file *File, err error) {
// Test if user token is valid. This helps because client.Do doesn't like this for some reason. XXX: More
// investigation needed, but for now this will do.
- _, err = api.AuthTest()
+ _, err = api.AuthTestContext(ctx)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/slack-go/slack/info.go b/vendor/github.com/slack-go/slack/info.go
index fde2bc98..b06dffdb 100644
--- a/vendor/github.com/slack-go/slack/info.go
+++ b/vendor/github.com/slack-go/slack/info.go
@@ -409,6 +409,11 @@ func (t JSONTime) Time() time.Time {
func (t *JSONTime) UnmarshalJSON(buf []byte) error {
s := bytes.Trim(buf, `"`)
+ if bytes.EqualFold(s, []byte("null")) {
+ *t = JSONTime(0)
+ return nil
+ }
+
v, err := strconv.Atoi(string(s))
if err != nil {
return err
diff --git a/vendor/github.com/slack-go/slack/internal/backoff/backoff.go b/vendor/github.com/slack-go/slack/internal/backoff/backoff.go
index df210f80..833e9f2b 100644
--- a/vendor/github.com/slack-go/slack/internal/backoff/backoff.go
+++ b/vendor/github.com/slack-go/slack/internal/backoff/backoff.go
@@ -51,7 +51,7 @@ func (b *Backoff) Duration() (dur time.Duration) {
return dur
}
-//Resets the current value of the counter back to Min
+// Resets the current value of the counter back to Min
func (b *Backoff) Reset() {
b.attempts = 0
}
diff --git a/vendor/github.com/slack-go/slack/misc.go b/vendor/github.com/slack-go/slack/misc.go
index bb99f2c4..9180116a 100644
--- a/vendor/github.com/slack-go/slack/misc.go
+++ b/vendor/github.com/slack-go/slack/misc.go
@@ -50,7 +50,7 @@ type SlackErrorResponse struct {
func (r SlackErrorResponse) Error() string { return r.Err }
-// RateLimitedError represents the rate limit respond from slack
+// RateLimitedError represents the rate limit response from slack
type RateLimitedError struct {
RetryAfter time.Duration
}
diff --git a/vendor/github.com/slack-go/slack/stars.go b/vendor/github.com/slack-go/slack/stars.go
index 52967604..6e0ebbe3 100644
--- a/vendor/github.com/slack-go/slack/stars.go
+++ b/vendor/github.com/slack-go/slack/stars.go
@@ -130,17 +130,18 @@ func (api *Client) ListStarsContext(ctx context.Context, params StarsParameters)
// GetStarred returns a list of StarredItem items.
//
// The user then has to iterate over them and figure out what they should
-// be looking at according to what is in the Type.
-// for _, item := range items {
-// switch c.Type {
-// case "file_comment":
-// log.Println(c.Comment)
-// case "file":
-// ...
+// be looking at according to what is in the Type:
+//
+// for _, item := range items {
+// switch c.Type {
+// case "file_comment":
+// log.Println(c.Comment)
+// case "file":
+// ...
+// }
//
-// }
// This function still exists to maintain backwards compatibility.
-// I exposed it as returning []StarredItem, so it shall stay as StarredItem
+// I exposed it as returning []StarredItem, so it shall stay as StarredItem.
func (api *Client) GetStarred(params StarsParameters) ([]StarredItem, *Paging, error) {
return api.GetStarredContext(context.Background(), params)
}