Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@zikaeroh
Created February 13, 2020 22:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zikaeroh/69ff621bcaff40c8199e7c0d651cf4be to your computer and use it in GitHub Desktop.
Save zikaeroh/69ff621bcaff40c8199e7c0d651cf4be to your computer and use it in GitHub Desktop.
[Trace - 14:02:04.332 PM] Sending request 'initialize - (0)'.
Params: {"processId":169688,"rootPath":"/home/jake/zikaeroh/hortbot/hortbot","rootUri":"file:///home/jake/zikaeroh/hortbot/hortbot","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional"},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]}},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true},"textDocument":{"publishDiagnostics":{"relatedInformation":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true},"codeAction":{"dynamicRegistration":true,"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}}},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"documentLink":{"dynamicRegistration":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true}}},"initializationOptions":{},"trace":"off","workspaceFolders":[{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot","name":"hortbot"}]}
[Trace - 14:02:04.333 PM] Received response 'initialize - (0)' in 1ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."]},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","source.organizeImports"]},"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":""},"renameProvider":{"prepareProvider":true},"foldingRangeProvider":true,"executeCommandProvider":{"commands":["tidy"]},"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":""}}
[Trace - 14:02:04.334 PM] Sending notification 'initialized'.
Params: {}
[Trace - 14:02:04.334 PM] Received request 'client/registerCapability - (1)'.
Params: {"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"},{"id":"workspace/didChangeWorkspaceFolders","method":"workspace/didChangeWorkspaceFolders"},{"id":"workspace/didChangeWatchedFiles","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"**/*.go","kind":7}]}}]}
[Trace - 14:02:04.335 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/web/web.go","languageId":"go","version":1,"text":"// Package web implements the HortBot web server.\npackage web\n\nimport (\n\t\"context\"\n\t\"database/sql\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"net\"\n\t\"net/http\"\n\t\"sort\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/go-chi/chi\"\n\t\"github.com/go-chi/chi/middleware\"\n\t\"github.com/gofrs/uuid\"\n\t\"github.com/gorilla/sessions\"\n\t\"github.com/hortbot/hortbot/internal/confimport\"\n\t\"github.com/hortbot/hortbot/internal/db/models\"\n\t\"github.com/hortbot/hortbot/internal/db/modelsx\"\n\t\"github.com/hortbot/hortbot/internal/db/redis\"\n\t\"github.com/hortbot/hortbot/internal/pkg/apis/twitch\"\n\t\"github.com/hortbot/hortbot/internal/pkg/ctxlog\"\n\t\"github.com/hortbot/hortbot/internal/pkg/jsonx\"\n\t\"github.com/hortbot/hortbot/internal/web/mid\"\n\t\"github.com/hortbot/hortbot/internal/web/static\"\n\t\"github.com/hortbot/hortbot/internal/web/templates\"\n\t\"github.com/prometheus/client_golang/prometheus/promhttp\"\n\t\"github.com/tomwright/queryparam/v4\"\n\t\"github.com/volatiletech/null\"\n\t\"github.com/volatiletech/sqlboiler/queries\"\n\t\"github.com/volatiletech/sqlboiler/queries/qm\"\n\t\"go.uber.org/zap\"\n)\n\nvar botScopes = []string{\n\t\"user_follows_edit\",\n\t\"channel:moderate\",\n\t\"chat:edit\",\n\t\"chat:read\",\n\t\"whispers:read\",\n\t\"whispers:edit\",\n}\n\n// App is the HortBot webapp.\ntype App struct {\n\tAddr string\n\tRealIP bool\n\tSessionKey []byte\n\tAdminAuth map[string]string\n\n\tBrand string\n\tBrandMap map[string]string\n\n\tDebug bool\n\n\tRedis *redis.DB\n\tDB *sql.DB\n\tTwitch *twitch.Twitch\n\n\tstore *sessions.CookieStore\n}\n\n// Run runs the webapp until the context is canceled.\nfunc (a *App) Run(ctx context.Context) error {\n\tctx, cancel := context.WithCancel(ctx)\n\tdefer cancel()\n\n\tif len(a.SessionKey) == 0 {\n\t\tpanic(\"empty session key\")\n\t}\n\n\ta.store = sessions.NewCookieStore(a.SessionKey)\n\n\tr := chi.NewRouter()\n\n\tlogger := ctxlog.FromContext(ctx)\n\tr.Use(mid.Logger(logger))\n\tr.Use(mid.RequestID)\n\n\tif a.RealIP {\n\t\tr.Use(middleware.RealIP)\n\t}\n\n\tr.Use(func(next http.Handler) http.Handler {\n\t\treturn promhttp.InstrumentHandlerCounter(metricRequest, next)\n\t})\n\n\tr.Use(mid.RequestLogger)\n\tr.Use(mid.Tracer)\n\tr.Use(mid.Recoverer)\n\tr.NotFound(func(w http.ResponseWriter, r *http.Request) {\n\t\ta.httpError(w, r, http.StatusNotFound)\n\t})\n\n\tr.Group(func(r chi.Router) {\n\t\tr.Use(middleware.RedirectSlashes)\n\n\t\tr.Get(\"/\", a.index)\n\t\tr.Get(\"/about\", a.about)\n\t\tr.Get(\"/docs\", a.docs)\n\t\tr.Get(\"/channels\", a.channels)\n\n\t\tconst paramChannel = \"channel\"\n\t\tr.Route(\"/c/{\"+paramChannel+\"}\", func(r chi.Router) {\n\t\t\tr.Use(func(next http.Handler) http.Handler {\n\t\t\t\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\t\t\t\tp := r.URL.Path\n\t\t\t\t\tlp := strings.ToLower(p)\n\n\t\t\t\t\tif p == lp {\n\t\t\t\t\t\tnext.ServeHTTP(w, r)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\n\t\t\t\t\tif r.URL.RawQuery != \"\" {\n\t\t\t\t\t\tlp += \"?\" + r.URL.RawQuery\n\t\t\t\t\t}\n\n\t\t\t\t\thttp.Redirect(w, r, lp, http.StatusMovedPermanently)\n\t\t\t\t})\n\t\t\t})\n\n\t\t\tr.Use(a.channelMiddleware(paramChannel))\n\t\t\tr.Get(\"/\", a.channel)\n\t\t\tr.Get(\"/commands\", a.channelCommands)\n\t\t\tr.Get(\"/quotes\", a.channelQuotes)\n\t\t\tr.Get(\"/autoreplies\", a.channelAutoreplies)\n\t\t\tr.Get(\"/lists\", a.channelLists)\n\t\t\tr.Get(\"/regulars\", a.channelRegulars)\n\t\t\tr.Get(\"/chatrules\", a.channelChatRules)\n\t\t\tr.Get(\"/scheduled\", a.channelScheduled)\n\t\t})\n\n\t\tr.Get(\"/login\", a.login)\n\t\tr.Get(\"/logout\", a.logout)\n\t\tr.Get(\"/auth/twitch\", a.authTwitchNormal)\n\t\tr.Get(\"/auth/twitch/bot\", a.authTwitchBot)\n\t\tr.Get(\"/auth/twitch/callback\", a.authTwitchCallback)\n\n\t\trouteDebug := func(r chi.Router) {\n\t\t\tr.Use(middleware.NoCache)\n\t\t\tr.Get(\"/request\", dumpRequest)\n\t\t}\n\n\t\tif a.Debug {\n\t\t\tr.Route(\"/debug\", routeDebug)\n\t\t}\n\n\t\tr.Route(\"/admin\", func(r chi.Router) {\n\t\t\tr.Use(middleware.NoCache)\n\t\t\tr.Use(a.adminAuth)\n\n\t\t\tr.Route(\"/debug\", routeDebug)\n\n\t\t\tr.Get(\"/import\", a.adminImport)\n\t\t\tr.Post(\"/import\", a.adminImportPost)\n\t\t\tr.Get(\"/export/{channel}\", a.adminExport)\n\t\t})\n\t})\n\n\tr.Handle(\"/static/*\", http.StripPrefix(\"/static\", http.FileServer(static.FS(false))))\n\tr.Handle(\"/favicon.ico\", http.RedirectHandler(\"/static/icons/favicon.ico\", http.StatusFound))\n\n\tsrv := http.Server{\n\t\tAddr: a.Addr,\n\t\tHandler: r,\n\t}\n\n\tgo func() {\n\t\t<-ctx.Done()\n\t\tif err := srv.Shutdown(context.Background()); err != nil {\n\t\t\tctxlog.Error(ctx, \"error shutting down server\", zap.Error(err))\n\t\t}\n\t}()\n\n\tctxlog.Info(ctx, \"web server listening\", zap.String(\"addr\", srv.Addr))\n\n\treturn srv.ListenAndServe()\n}\n\nfunc (a *App) getBrand(r *http.Request) string {\n\tif a.BrandMap == nil {\n\t\treturn a.Brand\n\t}\n\n\thost, _, _ := net.SplitHostPort(r.Host)\n\thost = normalizeHost(host)\n\n\tif host != \"\" {\n\t\tif brand := a.BrandMap[host]; brand != \"\" {\n\t\t\treturn brand\n\t\t}\n\t}\n\n\treturn a.Brand\n}\n\nfunc (a *App) basePage(r *http.Request) templates.BasePage {\n\treturn templates.BasePage{\n\t\tBrand: a.getBrand(r),\n\t\tUser: a.getSession(r).getUsername(),\n\t}\n}\n\ntype authState struct {\n\tHost string\n\tBot bool\n\tRedirect string\n}\n\nfunc (a *App) authTwitch(w http.ResponseWriter, r *http.Request, bot bool) {\n\tctx := r.Context()\n\n\tstate := uuid.Must(uuid.NewV4()).String()\n\n\tstateVal := &authState{\n\t\tHost: r.Host, // Not normalized; needed for redirects.\n\t\tBot: bot,\n\t}\n\n\tquery := struct {\n\t\tRedirect string `queryparam:\"redirect\"`\n\t}{}\n\n\tif err := queryparam.Parse(r.URL.Query(), &query); err != nil {\n\t\ta.httpError(w, r, http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tstateVal.Redirect = query.Redirect\n\n\tif err := a.Redis.SetAuthState(r.Context(), state, stateVal, time.Minute); err != nil {\n\t\tctxlog.Error(ctx, \"error setting auth state\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tvar extraScopes []string\n\tif bot {\n\t\textraScopes = botScopes\n\t}\n\n\turl := a.Twitch.AuthCodeURL(state, extraScopes...)\n\thttp.Redirect(w, r, url, http.StatusSeeOther)\n}\n\nfunc (a *App) authTwitchNormal(w http.ResponseWriter, r *http.Request) {\n\ta.authTwitch(w, r, false)\n}\n\nfunc (a *App) authTwitchBot(w http.ResponseWriter, r *http.Request) {\n\ta.authTwitch(w, r, true)\n}\n\nfunc (a *App) authTwitchCallback(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tstate := r.FormValue(\"state\")\n\tif state == \"\" {\n\t\ta.httpError(w, r, http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tvar stateVal authState\n\n\tok, err := a.Redis.GetAuthState(ctx, state, &stateVal)\n\tif err != nil {\n\t\tctxlog.Error(ctx, \"error checking auth state\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tif !ok {\n\t\ta.httpError(w, r, http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tif normalizeHost(stateVal.Host) != normalizeHost(r.Host) {\n\t\t// This came to the wrong host. Put the state back and redirect.\n\t\tif err := a.Redis.SetAuthState(r.Context(), state, &stateVal, time.Minute); err != nil {\n\t\t\tctxlog.Error(ctx, \"error setting auth state\", zap.Error(err))\n\t\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\t\treturn\n\t\t}\n\n\t\tu := *r.URL\n\t\tu.Host = stateVal.Host\n\t\ttemplates.WriteMetaRedirect(w, u.String())\n\t\treturn\n\t}\n\n\ttok, err := a.Twitch.Exchange(ctx, r.FormValue(\"code\"))\n\tif err != nil {\n\t\tctxlog.Error(ctx, \"error exchanging code\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tuser, newToken, err := a.Twitch.GetUserForToken(ctx, tok)\n\tif err != nil {\n\t\tctxlog.Error(ctx, \"error getting user for token\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\tif newToken != nil {\n\t\ttok = newToken\n\t}\n\n\ttt := modelsx.TokenToModel(user.ID, tok)\n\tif stateVal.Bot {\n\t\ttt.BotName = null.StringFrom(user.Name)\n\t}\n\n\tif err := modelsx.FullUpsertToken(ctx, a.DB, tt); err != nil {\n\t\tctxlog.Error(ctx, \"error upserting token\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tif err := a.clearSession(w, r); err != nil {\n\t\tctxlog.Error(ctx, \"error saving session\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tsession := a.getSession(r)\n\tsession.setTwitchID(user.ID)\n\tsession.setUsername(user.Name)\n\n\tif err := session.save(w, r); err != nil {\n\t\tctxlog.Error(ctx, \"error saving session\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tif stateVal.Redirect != \"\" {\n\t\thttp.Redirect(w, r, stateVal.Redirect, http.StatusSeeOther)\n\t\treturn\n\t}\n\n\tpage := &templates.LoginSuccessPage{\n\t\tBasePage: a.basePage(r),\n\t\tName: user.Name,\n\t\tID: user.ID,\n\t\tBot: stateVal.Bot,\n\t}\n\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) index(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tvar row struct {\n\t\tChannelCount int64 `boil:\"channel_count\"`\n\t\tBotCount int64 `boil:\"bot_count\"`\n\t}\n\n\tif err := queries.Raw(\"SELECT COUNT(*) AS channel_count, COUNT(DISTINCT bot_name) AS bot_count FROM channels WHERE active\").Bind(ctx, a.DB, &row); err != nil {\n\t\tctxlog.Error(ctx, \"error querying bot names\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tpage := &templates.IndexPage{\n\t\tBasePage: a.basePage(r),\n\t\tChannelCount: row.ChannelCount,\n\t\tBotCount: row.BotCount,\n\t}\n\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) about(w http.ResponseWriter, r *http.Request) {\n\tpage := &templates.AboutPage{\n\t\tBasePage: a.basePage(r),\n\t}\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) docs(w http.ResponseWriter, r *http.Request) {\n\tpage := &templates.DocsPage{\n\t\tBasePage: a.basePage(r),\n\t}\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) channels(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tchannels, err := models.Channels(\n\t\tmodels.ChannelWhere.Active.EQ(true),\n\t\tqm.OrderBy(models.ChannelColumns.Name),\n\t).All(ctx, a.DB)\n\tif err != nil {\n\t\tctxlog.Error(ctx, \"error querying channels\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tpage := &templates.ChannelsPage{\n\t\tBasePage: a.basePage(r),\n\t\tChannels: channels,\n\t}\n\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) channelPage(r *http.Request, channel *models.Channel) templates.ChannelPage {\n\treturn templates.ChannelPage{\n\t\tBasePage: a.basePage(r),\n\t\tChannel: channel,\n\t}\n}\n\nfunc (a *App) channel(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\tchannel := getChannel(ctx)\n\n\tpage := &templates.ChannelPage{\n\t\tBasePage: a.basePage(r),\n\t\tChannel: channel,\n\t}\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) channelCommands(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\tchannel := getChannel(ctx)\n\n\tcommands, err := channel.CustomCommands(qm.Load(models.CustomCommandRels.CommandInfo)).All(ctx, a.DB)\n\tif err != nil {\n\t\tctxlog.Error(ctx, \"error querying custom commands\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tsort.Slice(commands, func(i, j int) bool {\n\t\treturn commands[i].R.CommandInfo.Name < commands[j].R.CommandInfo.Name\n\t})\n\n\tpage := &templates.ChannelCommandsPage{\n\t\tChannelPage: a.channelPage(r, channel),\n\t\tCommands: commands,\n\t}\n\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) channelQuotes(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\tchannel := getChannel(ctx)\n\n\tquotes, err := channel.Quotes(qm.OrderBy(models.QuoteColumns.Num)).All(ctx, a.DB)\n\tif err != nil {\n\t\tctxlog.Error(ctx, \"error querying quotes\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tpage := &templates.ChannelQuotesPage{\n\t\tChannelPage: a.channelPage(r, channel),\n\t\tQuotes: quotes,\n\t}\n\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) channelAutoreplies(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\tchannel := getChannel(ctx)\n\n\tautoreplies, err := channel.Autoreplies(qm.OrderBy(models.AutoreplyColumns.Num)).All(ctx, a.DB)\n\tif err != nil {\n\t\tctxlog.Error(ctx, \"error querying autoreplies\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tpage := &templates.ChannelAutorepliesPage{\n\t\tChannelPage: a.channelPage(r, channel),\n\t\tAutoreplies: autoreplies,\n\t}\n\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) channelLists(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\tchannel := getChannel(ctx)\n\n\tlists, err := channel.CommandLists(qm.Load(models.CommandListRels.CommandInfo)).All(ctx, a.DB)\n\tif err != nil {\n\t\tctxlog.Error(ctx, \"error querying command lists\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tsort.Slice(lists, func(i, j int) bool {\n\t\treturn lists[i].R.CommandInfo.Name < lists[j].R.CommandInfo.Name\n\t})\n\n\tpage := &templates.ChannelListsPage{\n\t\tChannelPage: a.channelPage(r, channel),\n\t\tLists: lists,\n\t}\n\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) channelRegulars(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\tchannel := getChannel(ctx)\n\n\tpage := &templates.ChannelRegularsPage{\n\t\tChannelPage: a.channelPage(r, channel),\n\t}\n\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) channelChatRules(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\tchannel := getChannel(ctx)\n\n\tpage := &templates.ChannelRulesPage{\n\t\tChannelPage: a.channelPage(r, channel),\n\t}\n\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) channelScheduled(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\tchannel := getChannel(ctx)\n\n\trepeated, err := channel.RepeatedCommands(qm.Load(models.RepeatedCommandRels.CommandInfo)).All(ctx, a.DB)\n\tif err != nil {\n\t\tctxlog.Error(ctx, \"error querying repeated commands\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tscheduled, err := channel.ScheduledCommands(qm.Load(models.ScheduledCommandRels.CommandInfo)).All(ctx, a.DB)\n\tif err != nil {\n\t\tctxlog.Error(ctx, \"error querying scheduled commands\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\tsort.Slice(repeated, func(i, j int) bool {\n\t\tif repeated[i].Enabled != repeated[j].Enabled {\n\t\t\treturn repeated[i].Enabled\n\t\t}\n\n\t\treturn repeated[i].R.CommandInfo.Name < repeated[j].R.CommandInfo.Name\n\t})\n\n\tsort.Slice(scheduled, func(i, j int) bool {\n\t\tif scheduled[i].Enabled != scheduled[j].Enabled {\n\t\t\treturn scheduled[i].Enabled\n\t\t}\n\n\t\treturn scheduled[i].R.CommandInfo.Name < scheduled[j].R.CommandInfo.Name\n\t})\n\n\tpage := &templates.ChannelScheduledPage{\n\t\tChannelPage: a.channelPage(r, channel),\n\t\tRepeated: repeated,\n\t\tScheduled: scheduled,\n\t}\n\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) login(w http.ResponseWriter, r *http.Request) {\n\tpage := &templates.LoginPage{\n\t\tBasePage: a.basePage(r),\n\t}\n\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) adminAuth(next http.Handler) http.Handler {\n\treturn http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tif len(a.AdminAuth) == 0 {\n\t\t\ta.notAuthorized(w, r, false)\n\t\t\treturn\n\t\t}\n\n\t\tuser, pass, ok := r.BasicAuth()\n\t\tif !ok {\n\t\t\ta.notAuthorized(w, r, true)\n\t\t\treturn\n\t\t}\n\n\t\texpected := a.AdminAuth[user]\n\t\tif expected == \"\" || pass != expected {\n\t\t\ta.notAuthorized(w, r, true)\n\t\t\treturn\n\t\t}\n\n\t\tnext.ServeHTTP(w, r)\n\t})\n}\n\nfunc (a *App) adminExport(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\tchannelName := chi.URLParam(r, \"channel\")\n\n\tconfig, err := confimport.ExportByName(ctx, a.DB, strings.ToLower(channelName))\n\tif err != nil {\n\t\tif err == sql.ErrNoRows {\n\t\t\thttp.NotFound(w, r)\n\t\t} else {\n\t\t\tctxlog.Error(ctx, \"error exporting channel\", zap.Error(err))\n\t\t\thttp.Error(w, err.Error(), http.StatusInternalServerError)\n\t\t}\n\t\treturn\n\t}\n\n\tenc := json.NewEncoder(w)\n\n\tquery := struct {\n\t\tPretty bool `queryparam:\"pretty\"`\n\t}{}\n\n\tif err := queryparam.Parse(r.URL.Query(), &query); err != nil {\n\t\ta.httpError(w, r, http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tif query.Pretty {\n\t\tenc.SetIndent(\"\", \" \")\n\t}\n\n\tw.Header().Set(\"Content-Type\", \"application/json; charset=utf-8\")\n\n\tif err := enc.Encode(config); err != nil {\n\t\tctxlog.Error(ctx, \"error encoding exported config\", zap.Error(err))\n\t}\n}\n\nfunc (a *App) adminImport(w http.ResponseWriter, r *http.Request) {\n\tpage := &templates.AdminImportPage{\n\t\tBasePage: a.basePage(r),\n\t}\n\ttemplates.WritePageTemplate(w, page)\n}\n\nfunc (a *App) adminImportPost(w http.ResponseWriter, r *http.Request) {\n\tconfig := &confimport.Config{}\n\n\tif err := jsonx.DecodeSingle(r.Body, config); err != nil {\n\t\thttp.Error(w, \"decoding body: \"+err.Error(), http.StatusBadRequest)\n\t\treturn\n\t}\n\n\tctx := r.Context()\n\ttx, err := a.DB.BeginTx(ctx, nil)\n\tif err != nil {\n\t\thttp.Error(w, \"beginning transaction: \"+err.Error(), http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\trolledBack := false\n\n\tdefer func() {\n\t\tif rolledBack {\n\t\t\treturn\n\t\t}\n\n\t\tif err := tx.Commit(); err != nil {\n\t\t\tfmt.Fprintln(w, \"committing transaction:\", err)\n\t\t}\n\t}()\n\n\tif err := config.Insert(ctx, tx); err != nil {\n\t\thttp.Error(w, \"inserting config: \"+err.Error(), http.StatusBadRequest)\n\t\tif err := tx.Rollback(); err != nil {\n\t\t\tfmt.Fprintln(w, \"rolling back transaction:\", err)\n\t\t}\n\t\trolledBack = true\n\t\treturn\n\t}\n\n\tfmt.Fprintln(w, \"Successfully inserted channel\", config.Channel.ID)\n}\n\nfunc (a *App) logout(w http.ResponseWriter, r *http.Request) {\n\tctx := r.Context()\n\n\tif err := a.clearSession(w, r); err != nil {\n\t\tctxlog.Error(ctx, \"error clearing session\", zap.Error(err))\n\t\ta.httpError(w, r, http.StatusInternalServerError)\n\t\treturn\n\t}\n\n\thttp.Redirect(w, r, \"/\", http.StatusSeeOther)\n}\n"}}
[Trace - 14:02:04.338 PM] Sending response 'client/registerCapability - (1)' took 3ms.
Result: {}
[Trace - 14:02:04.425 PM] Received request 'workspace/configuration - (2)'.
Params: {"items":[{"scopeUri":"file:///home/jake/zikaeroh/hortbot/hortbot","section":"gopls"},{"scopeUri":"file:///home/jake/zikaeroh/hortbot/hortbot","section":"gopls-hortbot"}]}
[Trace - 14:02:04.425 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:04 Build info\n----------\ngolang.org/x/tools/gopls master\n golang.org/x/tools/gopls@v0.1.8-0.20200213215053-695c81b9c693 h1:sjD2TPtvUnsvA9vz0LDnPBnnRgQwtqfnqKJsyREI/To=\n github.com/BurntSushi/toml@v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=\n github.com/sergi/go-diff@v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ=\n golang.org/x/mod@v0.1.1-0.20191105210325-c90efee705ee h1:WG0RUwxtNT4qqaXX3DPA8zHFNm/D9xaBpxzHt1WcA/E=\n golang.org/x/sync@v0.0.0-20190423024810-112230192c58 h1:8gQV6CLnAEikrhgkHFbMAEhagSSnXWGV915qUMm9mrU=\n golang.org/x/tools@v0.0.0-20200213215053-695c81b9c693 h1:cavpmULeqA05a7O3fsa+45jhv7uthnk3rYKFyRyBG/M=\n golang.org/x/xerrors@v0.0.0-20191011141410-1b5146add898 h1:/atklqdjdhuosWIl6AIbOeHJjicWYPqR9bpxqxYG2pA=\n honnef.co/go/tools@v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM=\n mvdan.cc/xurls/v2@v2.1.0 h1:KaMb5GLhlcSX+e+qhbRJODnUUBvlw01jt4yrjFIHAuA=\n\nGo info\n-------\ngo version go1.13.7 linux/amd64\n\nGO111MODULE=\"\"\nGOARCH=\"amd64\"\nGOBIN=\"\"\nGOCACHE=\"/home/jake/.cache/go-build\"\nGOENV=\"/home/jake/.config/go/env\"\nGOEXE=\"\"\nGOFLAGS=\"\"\nGOHOSTARCH=\"amd64\"\nGOHOSTOS=\"linux\"\nGONOPROXY=\"\"\nGONOSUMDB=\"\"\nGOOS=\"linux\"\nGOPATH=\"/home/jake/go\"\nGOPRIVATE=\"\"\nGOPROXY=\"https://proxy.golang.org,direct\"\nGOROOT=\"/usr/lib/go\"\nGOSUMDB=\"sum.golang.org\"\nGOTMPDIR=\"\"\nGOTOOLDIR=\"/usr/lib/go/pkg/tool/linux_amd64\"\nGCCGO=\"gccgo\"\nAR=\"ar\"\nCC=\"gcc\"\nCXX=\"g++\"\nCGO_ENABLED=\"1\"\nGOMOD=\"/home/jake/zikaeroh/hortbot/hortbot/go.mod\"\nCGO_CFLAGS=\"-g -O2\"\nCGO_CPPFLAGS=\"\"\nCGO_CXXFLAGS=\"-g -O2\"\nCGO_FFLAGS=\"-g -O2\"\nCGO_LDFLAGS=\"-g -O2\"\nPKG_CONFIG=\"pkg-config\"\nGOGCCFLAGS=\"-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build584084737=/tmp/go-build -gno-record-gcc-switches\"\n"}
[Trace - 14:02:04.436 PM] Sending response 'workspace/configuration - (2)' took 10ms.
Result: [{"usePlaceholders":false},null]
[Trace - 14:02:05.639 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:05 go/packages.Load\n\tsnapshot = 0\n\tquery = [./... builtin]\n\tpackages = 158"}
[Trace - 14:02:15.969 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","languageId":"go","version":1,"text":""}}
[Trace - 14:02:15.969 PM] Sending request 'textDocument/documentLink - (1)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Error - 14:02:15.984 PM] Received #1 successfully parsed but no token.File for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go (/home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go:1:1: expected ';', found 'EOF' (and 2 more errors))
[Trace - 14:02:16.086 PM] Sending notification 'workspace/didChangeWatchedFiles'.
Params: {"changes":[{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","type":1}]}
[Trace - 14:02:16.135 PM] Sending request 'textDocument/foldingRange - (2)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Error - 14:02:16.136 PM] Received #2 successfully parsed but no token.File for file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go (/home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go:1:1: expected ';', found 'EOF' (and 2 more errors))
[Trace - 14:02:16.190 PM] Sending request 'textDocument/codeLens - (3)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Trace - 14:02:16.191 PM] Received response 'textDocument/codeLens - (3)' in 0ms.
Result: {}
[Trace - 14:02:16.472 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":2},"contentChanges":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":0}},"rangeLength":0,"text":"p"}]}
[Trace - 14:02:16.473 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":3},"contentChanges":[{"range":{"start":{"line":0,"character":1},"end":{"line":0,"character":1}},"rangeLength":0,"text":"a"}]}
[Trace - 14:02:16.518 PM] Sending request 'textDocument/completion - (4)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"},"position":{"line":0,"character":2},"context":{"triggerKind":1}}
[Trace - 14:02:16.598 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":4},"contentChanges":[{"range":{"start":{"line":0,"character":2},"end":{"line":0,"character":2}},"rangeLength":0,"text":"c"}]}
[Trace - 14:02:16.813 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":5},"contentChanges":[{"range":{"start":{"line":0,"character":3},"end":{"line":0,"character":3}},"rangeLength":0,"text":"k"}]}
[Trace - 14:02:16.813 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":6},"contentChanges":[{"range":{"start":{"line":0,"character":4},"end":{"line":0,"character":4}},"rangeLength":0,"text":"a"}]}
[Trace - 14:02:16.918 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":7},"contentChanges":[{"range":{"start":{"line":0,"character":5},"end":{"line":0,"character":5}},"rangeLength":0,"text":"g"}]}
[Trace - 14:02:16.919 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":8},"contentChanges":[{"range":{"start":{"line":0,"character":6},"end":{"line":0,"character":6}},"rangeLength":0,"text":"e"}]}
[Trace - 14:02:16.977 PM] Received response 'textDocument/completion - (4)' in 458ms.
Result: {"isIncomplete":false,"items":[]}
[Trace - 14:02:16.977 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:16 no completions found\n\tAt = {0 2}\n\tFailure = getting file for Completion: no PackageHandles"}
[Trace - 14:02:16.977 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:16 go/packages.Load\n\tsnapshot = 4\n\tquery = [file=/home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go]\n\tpackages = 0"}
[Trace - 14:02:17.017 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":9},"contentChanges":[{"range":{"start":{"line":0,"character":7},"end":{"line":0,"character":7}},"rangeLength":0,"text":" "}]}
[Trace - 14:02:17.070 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":10},"contentChanges":[{"range":{"start":{"line":0,"character":8},"end":{"line":0,"character":8}},"rangeLength":0,"text":"b"}]}
[Trace - 14:02:17.071 PM] Sending request 'textDocument/completion - (5)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"},"position":{"line":0,"character":9},"context":{"triggerKind":1}}
[Trace - 14:02:17.313 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":11},"contentChanges":[{"range":{"start":{"line":0,"character":9},"end":{"line":0,"character":9}},"rangeLength":0,"text":"o"}]}
[Trace - 14:02:17.364 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":12},"contentChanges":[{"range":{"start":{"line":0,"character":10},"end":{"line":0,"character":10}},"rangeLength":0,"text":"t"}]}
[Trace - 14:02:17.409 PM] Sending request 'textDocument/documentLink - (6)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Trace - 14:02:17.536 PM] Sending request 'textDocument/foldingRange - (7)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Trace - 14:02:17.586 PM] Sending request 'textDocument/codeLens - (8)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Trace - 14:02:17.590 PM] Sending request 'textDocument/codeAction - (9)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"},"range":{"start":{"line":0,"character":11},"end":{"line":0,"character":11}},"context":{"diagnostics":[]}}
[Trace - 14:02:17.653 PM] Received response 'textDocument/completion - (5)' in 582ms.
Result: {"isIncomplete":false,"items":[]}
[Trace - 14:02:17.653 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:17 go/packages.Load\n\tsnapshot = 11\n\tquery = [file=/home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go]\n\tpackages = 0"}
[Trace - 14:02:17.654 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:17 no completions found\n\tAt = {0 9}\n\tFailure = getting file for Completion: no PackageHandles"}
[Trace - 14:02:17.678 PM] Received response 'textDocument/documentLink - (6)' in 269ms.
Result: {}
[Trace - 14:02:17.679 PM] Received response 'textDocument/foldingRange - (7)' in 142ms.
Result: []
[Trace - 14:02:17.679 PM] Received response 'textDocument/codeLens - (8)' in 92ms.
Result: {}
[Trace - 14:02:17.921 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:17 go/packages.Load\n\tsnapshot = 13\n\tquery = [file=/home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go]\n\tpackages = 1"}
[Trace - 14:02:17.921 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:17 go/packages.Load\n\tsnapshot = 13\n\tpackage = github.com/hortbot/hortbot/internal/bot\n\tfiles = [/home/jake/zikaeroh/hortbot/hortbot/internal/bot/access_level.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/accesslevel_string.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/actions.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/autoreplies.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/bot.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/builtin_commands.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_admin.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_autoreplies.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_command.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_filters.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_fun.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_lastfm.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_levels.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_list.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_management.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_misc.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_moderation.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_quote.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_raffle.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_random.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_repeat.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_settings.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_steam.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_twitch.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_var.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_website.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/custom_command.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/deps.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/filters.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/handle.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/handlers.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/helpers.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/interfaces.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/metrics.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/rdb.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/repeat.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/session.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/testing.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/user_state.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/var.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go]"}
[Trace - 14:02:18.357 PM] Received response 'textDocument/codeAction - (9)' in 767ms.
Result: {}
[Trace - 14:02:18.485 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:18 go/packages.Load\n\tsnapshot = 13\n\tquery = [github.com/hortbot/hortbot github.com/hortbot/hortbot/internal/bot github.com/hortbot/hortbot/internal/bot github.com/hortbot/hortbot/internal/bot github.com/hortbot/hortbot/internal/bot github.com/hortbot/hortbot/internal/bot github.com/hortbot/hortbot/internal/bot/botfakes github.com/hortbot/hortbot/internal/bot/btest github.com/hortbot/hortbot/internal/cli/flags/botflags github.com/hortbot/hortbot/internal/cli/subcommands/bot]\n\tpackages = 6"}
[Trace - 14:02:18.485 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:18 go/packages.Load\n\tsnapshot = 13\n\tpackage = github.com/hortbot/hortbot/internal/bot\n\tfiles = [/home/jake/zikaeroh/hortbot/hortbot/internal/bot/access_level.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/accesslevel_string.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/actions.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/autoreplies.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/bot.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/builtin_commands.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_admin.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_autoreplies.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_command.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_filters.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_fun.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_lastfm.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_levels.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_list.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_management.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_misc.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_moderation.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_quote.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_raffle.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_random.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_repeat.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_settings.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_steam.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_twitch.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_var.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_website.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/custom_command.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/deps.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/filters.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/handle.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/handlers.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/helpers.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/interfaces.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/metrics.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/rdb.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/repeat.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/session.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/testing.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/user_state.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/var.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go]"}
[Trace - 14:02:18.485 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:18 go/packages.Load\n\tsnapshot = 13\n\tpackage = github.com/hortbot/hortbot/internal/cli/flags/botflags\n\tfiles = [/home/jake/zikaeroh/hortbot/hortbot/internal/cli/flags/botflags/botflags.go]"}
[Trace - 14:02:18.485 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:18 go/packages.Load\n\tsnapshot = 13\n\tpackage = github.com/hortbot/hortbot/internal/cli/subcommands/bot\n\tfiles = [/home/jake/zikaeroh/hortbot/hortbot/internal/cli/subcommands/bot/bot.go]"}
[Trace - 14:02:18.485 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:18 go/packages.Load\n\tsnapshot = 13\n\tpackage = github.com/hortbot/hortbot\n\tfiles = [/home/jake/zikaeroh/hortbot/hortbot/main.go]"}
[Trace - 14:02:18.486 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:18 go/packages.Load\n\tsnapshot = 13\n\tpackage = github.com/hortbot/hortbot/internal/bot/botfakes\n\tfiles = [/home/jake/zikaeroh/hortbot/hortbot/internal/bot/botfakes/fake_notifier.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/botfakes/fake_rand.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/botfakes/fake_sender.go]"}
[Trace - 14:02:18.486 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:18 go/packages.Load\n\tsnapshot = 13\n\tpackage = github.com/hortbot/hortbot/internal/bot/btest\n\tfiles = [/home/jake/zikaeroh/hortbot/hortbot/internal/bot/btest/apis.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/btest/clock.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/btest/db.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/btest/fakes.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/btest/irc.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/btest/script_tester.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/btest/twitch.go]"}
[Trace - 14:02:19.934 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:19 go/packages.Load\n\tsnapshot = 13\n\tquery = [file=/home/jake/zikaeroh/hortbot/hortbot/internal/bot/access_level_test.go file=/home/jake/zikaeroh/hortbot/hortbot/internal/bot/bench_test.go file=/home/jake/zikaeroh/hortbot/hortbot/internal/bot/bot_test.go file=/home/jake/zikaeroh/hortbot/hortbot/internal/bot/export_test.go file=/home/jake/zikaeroh/hortbot/hortbot/internal/bot/handlers_test.go file=/home/jake/zikaeroh/hortbot/hortbot/internal/bot/main_test.go file=/home/jake/zikaeroh/hortbot/hortbot/internal/bot/script_test.go file=/home/jake/zikaeroh/hortbot/hortbot/internal/bot/testcmd_test.go file=/home/jake/zikaeroh/hortbot/hortbot/internal/bot/testing_test.go]\n\tpackages = 0"}
[Trace - 14:02:19.934 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2020/02/13 14:02:19 diagnose: no workspace packages: github.com/hortbot/hortbot/internal/bot_test [github.com/hortbot/hortbot/internal/bot.test] has no metadata\n\tsnapshot = 13\n\tdirectory = 0xab8580"}
[Trace - 14:02:20.104 PM] Sending request 'textDocument/codeAction - (10)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"},"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":11}},"context":{"diagnostics":[]}}
[Trace - 14:02:20.105 PM] Received response 'textDocument/codeAction - (10)' in 1ms.
Result: {}
[Trace - 14:02:20.112 PM] Sending request 'textDocument/formatting - (11)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"},"options":{"tabSize":4,"insertSpaces":false}}
[Trace - 14:02:20.113 PM] Received response 'textDocument/formatting - (11)' in 0ms.
Result: [{"range":{"start":{"line":1,"character":0},"end":{"line":1,"character":0}},"newText":"\n"}]
[Trace - 14:02:20.144 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":13},"contentChanges":[{"range":{"start":{"line":0,"character":11},"end":{"line":0,"character":11}},"rangeLength":0,"text":"\n"}]}
[Trace - 14:02:20.343 PM] Sending notification 'textDocument/didSave'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":13}}
[Trace - 14:02:20.359 PM] Sending request 'textDocument/foldingRange - (12)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Trace - 14:02:20.362 PM] Received response 'textDocument/foldingRange - (12)' in 2ms.
Result: []
[Trace - 14:02:20.388 PM] Sending request 'textDocument/codeLens - (13)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Trace - 14:02:20.389 PM] Received response 'textDocument/codeLens - (13)' in 0ms.
Result: {}
[Trace - 14:02:20.599 PM] Sending notification 'workspace/didChangeWatchedFiles'.
Params: {"changes":[{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","type":2}]}
[Trace - 14:02:21.135 PM] Sending request 'textDocument/documentLink - (14)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Trace - 14:02:21.135 PM] Received response 'textDocument/documentLink - (14)' in 0ms.
Result: {}
[Trace - 14:02:21.387 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:21 go/packages.Load\n\tsnapshot = 15\n\tquery = [github.com/hortbot/hortbot/internal/bot github.com/hortbot/hortbot/internal/bot github.com/hortbot/hortbot/internal/bot github.com/hortbot/hortbot/internal/bot]\n\tpackages = 4"}
[Trace - 14:02:21.387 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:21 go/packages.Load\n\tsnapshot = 15\n\tpackage = github.com/hortbot/hortbot/internal/bot\n\tfiles = [/home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/access_level.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/accesslevel_string.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/actions.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/autoreplies.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/bot.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/builtin_commands.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_admin.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_autoreplies.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_command.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_filters.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_fun.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_lastfm.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_levels.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_list.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_management.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_misc.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_moderation.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_quote.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_raffle.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_random.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_repeat.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_settings.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_steam.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_twitch.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_var.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_website.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/custom_command.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/deps.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/filters.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/handle.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/handlers.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/helpers.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/interfaces.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/metrics.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/rdb.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/repeat.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/session.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/testing.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/user_state.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/var.go]"}
[Trace - 14:02:21.388 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:21 go/packages.Load\n\tsnapshot = 15\n\tpackage = github.com/hortbot/hortbot/internal/bot\n\tfiles = [/home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/access_level.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/accesslevel_string.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/actions.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/autoreplies.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/bot.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/builtin_commands.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_admin.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_autoreplies.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_command.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_filters.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_fun.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_lastfm.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_levels.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_list.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_management.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_misc.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_moderation.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_quote.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_raffle.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_random.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_repeat.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_schedule.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_settings.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_steam.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_twitch.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_var.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_website.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/custom_command.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/deps.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/filters.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/handle.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/handlers.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/helpers.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/interfaces.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/metrics.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/rdb.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/repeat.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/session.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/testing.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/user_state.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/var.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/access_level_test.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/export_test.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/handlers_test.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/testing_test.go]"}
[Trace - 14:02:21.389 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:21 go/packages.Load\n\tsnapshot = 15\n\tpackage = github.com/hortbot/hortbot/internal/bot_test\n\tfiles = [/home/jake/zikaeroh/hortbot/hortbot/internal/bot/bench_test.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/bot_test.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/main_test.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/script_test.go /home/jake/zikaeroh/hortbot/hortbot/internal/bot/testcmd_test.go]"}
[Trace - 14:02:21.390 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:21 go/packages.Load\n\tsnapshot = 15\n\tpackage = github.com/hortbot/hortbot/internal/bot.test\n\tfiles = [/home/jake/.cache/go-build/53/5331a0a196d3eb86db0bbfcc5efe6a0093644d05efa5269d31cf52a3bedb9b4c-d]"}
[Trace - 14:02:21.521 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/cli/subcommands/bot/bot.go","diagnostics":[{"range":{"start":{"line":69,"character":30},"end":{"line":69,"character":36}},"severity":1,"source":"compiler","message":"cannot use sender (variable of type *bnsq.SendMessagePublisher) as bot.Sender value in argument to c.Bot.New: wrong type for method SendMessage"},{"range":{"start":{"line":69,"character":38},"end":{"line":69,"character":46}},"severity":1,"source":"compiler","message":"cannot use notifier (variable of type *bnsq.NotifyPublisher) as bot.Notifier value in argument to c.Bot.New: wrong type for method NotifyChannelUpdates"}]}
[Trace - 14:02:21.521 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/cli/flags/botflags/botflags.go","diagnostics":[{"range":{"start":{"line":86,"character":11},"end":{"line":86,"character":22}},"severity":1,"source":"compiler","message":"cannot use (logSender literal) (value of type logSender) as bot.Sender value in assignment: wrong type for method SendMessage"}]}
[Trace - 14:02:32.274 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":14},"contentChanges":[{"range":{"start":{"line":1,"character":0},"end":{"line":1,"character":0}},"rangeLength":0,"text":"\n"}]}
[Trace - 14:02:32.428 PM] Sending request 'textDocument/foldingRange - (15)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Trace - 14:02:32.428 PM] Received response 'textDocument/foldingRange - (15)' in 0ms.
Result: []
[Trace - 14:02:32.477 PM] Sending request 'textDocument/codeLens - (16)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Trace - 14:02:32.478 PM] Received response 'textDocument/codeLens - (16)' in 0ms.
Result: {}
[Trace - 14:02:33.232 PM] Sending request 'textDocument/documentLink - (17)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Trace - 14:02:33.233 PM] Received response 'textDocument/documentLink - (17)' in 1ms.
Result: {}
[Trace - 14:02:34.572 PM] Sending notification 'textDocument/didChange'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":15},"contentChanges":[{"range":{"start":{"line":1,"character":0},"end":{"line":2,"character":0}},"rangeLength":1,"text":""}]}
[Trace - 14:02:34.610 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/handle.go","diagnostics":[{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":54}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/correlation (no package for import github.com/hortbot/hortbot/internal/pkg/correlation)"},{"range":{"start":{"line":15,"character":1},"end":{"line":15,"character":28}},"severity":1,"source":"compiler","message":"could not import github.com/jakebailey/irc (no package for import github.com/jakebailey/irc)"}]}
[Trace - 14:02:34.614 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_autoreplies.go","diagnostics":[{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":9}},"severity":1,"source":"compiler","message":"could not import errors (no package for import errors)"},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":9}},"severity":1,"source":"compiler","message":"could not import regexp (no package for import regexp)"},{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":16}},"severity":1,"source":"compiler","message":"could not import regexp/syntax (no package for import regexp/syntax)"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":31}},"severity":1,"source":"compiler","message":"could not import github.com/volatiletech/null (no package for import github.com/volatiletech/null)"}]}
[Trace - 14:02:34.616 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/bot.go","diagnostics":[{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":7}},"severity":1,"source":"compiler","message":"could not import sync (no package for import sync)"},{"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":47}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/db/redis (no package for import github.com/hortbot/hortbot/internal/db/redis)"},{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":54}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/apis/lastfm (no package for import github.com/hortbot/hortbot/internal/pkg/apis/lastfm)"},{"range":{"start":{"line":11,"character":1},"end":{"line":11,"character":53}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/apis/steam (no package for import github.com/hortbot/hortbot/internal/pkg/apis/steam)"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":55}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/apis/tinyurl (no package for import github.com/hortbot/hortbot/internal/pkg/apis/tinyurl)"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":54}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/apis/twitch (no package for import github.com/hortbot/hortbot/internal/pkg/apis/twitch)"},{"range":{"start":{"line":14,"character":1},"end":{"line":14,"character":53}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/apis/urban (no package for import github.com/hortbot/hortbot/internal/pkg/apis/urban)"},{"range":{"start":{"line":15,"character":1},"end":{"line":15,"character":52}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/apis/xkcd (no package for import github.com/hortbot/hortbot/internal/pkg/apis/xkcd)"},{"range":{"start":{"line":16,"character":1},"end":{"line":16,"character":55}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/apis/youtube (no package for import github.com/hortbot/hortbot/internal/pkg/apis/youtube)"},{"range":{"start":{"line":17,"character":1},"end":{"line":17,"character":52}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/errgroupx (no package for import github.com/hortbot/hortbot/internal/pkg/errgroupx)"},{"range":{"start":{"line":18,"character":1},"end":{"line":18,"character":50}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/recache (no package for import github.com/hortbot/hortbot/internal/pkg/recache)"},{"range":{"start":{"line":19,"character":1},"end":{"line":19,"character":49}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/repeat (no package for import github.com/hortbot/hortbot/internal/pkg/repeat)"},{"range":{"start":{"line":20,"character":1},"end":{"line":20,"character":29}},"severity":1,"source":"compiler","message":"could not import github.com/leononame/clock (no package for import github.com/leononame/clock)"}]}
[Trace - 14:02:34.617 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/btest/script_tester.go","diagnostics":[{"range":{"start":{"line":129,"character":14},"end":{"line":129,"character":19}},"severity":1,"source":"compiler","message":"cannot use st.db (variable of type *sql.DB) as *invalid type value in struct literal"},{"range":{"start":{"line":131,"character":14},"end":{"line":131,"character":23}},"severity":1,"source":"compiler","message":"cannot use st.sender (variable of type *botfakes.FakeSender) as bot.Sender value in struct literal: wrong type for method SendMessage"},{"range":{"start":{"line":132,"character":14},"end":{"line":132,"character":25}},"severity":1,"source":"compiler","message":"cannot use st.notifier (variable of type *botfakes.FakeNotifier) as bot.Notifier value in struct literal: wrong type for method NotifyChannelUpdates"}]}
[Trace - 14:02:34.618 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/btest/clock.go","diagnostics":[{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":29}},"severity":1,"source":"compiler","message":"\"github.com/leononame/clock\" imported but not used"}]}
[Trace - 14:02:34.619 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_command.go","diagnostics":[{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":29}},"severity":1,"source":"compiler","message":"could not import github.com/gobuffalo/flect (no package for import github.com/gobuffalo/flect)"}]}
[Trace - 14:02:34.622 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/actions.go","diagnostics":[{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":10}},"severity":1,"source":"compiler","message":"could not import context (no package for import context)"},{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":15}},"severity":1,"source":"compiler","message":"could not import database/sql (no package for import database/sql)"},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":10}},"severity":1,"source":"compiler","message":"could not import net/url (no package for import net/url)"},{"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":10}},"severity":1,"source":"compiler","message":"could not import strings (no package for import strings)"},{"range":{"start":{"line":9,"character":1},"end":{"line":9,"character":7}},"severity":1,"source":"compiler","message":"could not import time (no package for import time)"},{"range":{"start":{"line":11,"character":1},"end":{"line":11,"character":31}},"severity":1,"source":"compiler","message":"could not import github.com/araddon/dateparse (no package for import github.com/araddon/dateparse)"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":26}},"severity":1,"source":"compiler","message":"could not import github.com/hako/durafmt (no package for import github.com/hako/durafmt)"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":42}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/cbp (no package for import github.com/hortbot/hortbot/internal/cbp)"},{"range":{"start":{"line":15,"character":1},"end":{"line":15,"character":49}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/db/modelsx (no package for import github.com/hortbot/hortbot/internal/db/modelsx)"},{"range":{"start":{"line":16,"character":1},"end":{"line":16,"character":57}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/apis/extralife (no package for import github.com/hortbot/hortbot/internal/pkg/apis/extralife)"},{"range":{"start":{"line":17,"character":1},"end":{"line":17,"character":51}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/stringsx (no package for import github.com/hortbot/hortbot/internal/pkg/stringsx)"},{"range":{"start":{"line":18,"character":1},"end":{"line":18,"character":47}},"severity":1,"source":"compiler","message":"could not import github.com/volatiletech/sqlboiler/queries/qm (no package for import github.com/volatiletech/sqlboiler/queries/qm)"},{"range":{"start":{"line":19,"character":1},"end":{"line":19,"character":25}},"severity":1,"source":"compiler","message":"could not import go.opencensus.io/trace (no package for import go.opencensus.io/trace)"},{"range":{"start":{"line":353,"character":5},"end":{"line":353,"character":6}},"severity":1,"source":"compiler","message":"i declared but not used"}]}
[Trace - 14:02:34.624 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/testing.go","diagnostics":[{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":5}},"severity":1,"source":"compiler","message":"could not import os (no package for import os)"}]}
[Trace - 14:02:34.625 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/filters.go","diagnostics":[{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":10}},"severity":1,"source":"compiler","message":"could not import unicode (no package for import unicode)"}]}
[Trace - 14:02:34.626 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/metrics.go","diagnostics":[{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":49}},"severity":1,"source":"compiler","message":"could not import github.com/prometheus/client_golang/prometheus (no package for import github.com/prometheus/client_golang/prometheus)"},{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":58}},"severity":1,"source":"compiler","message":"could not import github.com/prometheus/client_golang/prometheus/promauto (no package for import github.com/prometheus/client_golang/prometheus/promauto)"}]}
[Trace - 14:02:34.627 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/interfaces.go","diagnostics":[{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":12}},"severity":1,"source":"compiler","message":"could not import math/rand (no package for import math/rand)"}]}
[Trace - 14:02:34.629 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_admin.go","diagnostics":[{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":52}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/bnsq/bnsqmeta (no package for import github.com/hortbot/hortbot/internal/bnsq/bnsqmeta)"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":46}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/version (no package for import github.com/hortbot/hortbot/internal/version)"}]}
[Trace - 14:02:34.630 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/access_level.go","diagnostics":[{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":6}},"severity":1,"source":"compiler","message":"could not import fmt (no package for import fmt)"},{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":48}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/db/models (no package for import github.com/hortbot/hortbot/internal/db/models)"},{"range":{"start":{"line":69,"character":0},"end":{"line":69,"character":1}},"severity":1,"source":"compiler","message":"missing return"}]}
[Trace - 14:02:34.631 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/accesslevel_string.go","diagnostics":[{"range":{"start":{"line":4,"character":7},"end":{"line":4,"character":16}},"severity":1,"source":"compiler","message":"could not import strconv (no package for import strconv)"}]}
[Trace - 14:02:34.632 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_levels.go","diagnostics":[{"range":{"start":{"line":4,"character":1},"end":{"line":4,"character":7}},"severity":1,"source":"compiler","message":"could not import sort (no package for import sort)"}]}
[Trace - 14:02:34.633 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/session.go","diagnostics":[{"range":{"start":{"line":18,"character":1},"end":{"line":18,"character":52}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/findlinks (no package for import github.com/hortbot/hortbot/internal/pkg/findlinks)"},{"range":{"start":{"line":21,"character":1},"end":{"line":21,"character":22}},"severity":1,"source":"compiler","message":"could not import golang.org/x/oauth2 (no package for import golang.org/x/oauth2)"}]}
[Trace - 14:02:34.634 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/autoreplies.go","diagnostics":[{"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":49}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/ctxlog (no package for import github.com/hortbot/hortbot/internal/pkg/ctxlog)"},{"range":{"start":{"line":9,"character":1},"end":{"line":9,"character":41}},"severity":1,"source":"compiler","message":"could not import github.com/volatiletech/sqlboiler/boil (no package for import github.com/volatiletech/sqlboiler/boil)"},{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":44}},"severity":1,"source":"compiler","message":"could not import github.com/volatiletech/sqlboiler/queries (no package for import github.com/volatiletech/sqlboiler/queries)"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":18}},"severity":1,"source":"compiler","message":"could not import go.uber.org/zap (no package for import go.uber.org/zap)"}]}
[Trace - 14:02:34.635 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_filters.go","diagnostics":[{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":52}},"severity":1,"source":"compiler","message":"could not import github.com/hortbot/hortbot/internal/pkg/linkmatch (no package for import github.com/hortbot/hortbot/internal/pkg/linkmatch)"}]}
[Trace - 14:02:34.636 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/cmd_settings.go","diagnostics":[{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":15}},"severity":1,"source":"compiler","message":"could not import unicode/utf8 (no package for import unicode/utf8)"}]}
[Trace - 14:02:34.762 PM] Sending request 'textDocument/foldingRange - (18)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Trace - 14:02:34.763 PM] Received response 'textDocument/foldingRange - (18)' in 1ms.
Result: []
[Trace - 14:02:34.834 PM] Sending request 'textDocument/codeLens - (19)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Trace - 14:02:34.835 PM] Received response 'textDocument/codeLens - (19)' in 1ms.
Result: {}
[Trace - 14:02:35.566 PM] Sending request 'textDocument/documentLink - (20)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"}}
[Trace - 14:02:35.567 PM] Received response 'textDocument/documentLink - (20)' in 1ms.
Result: {}
[Trace - 14:02:37.608 PM] Sending request 'textDocument/codeAction - (21)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"},"range":{"start":{"line":0,"character":0},"end":{"line":1,"character":0}},"context":{"diagnostics":[]}}
[Trace - 14:02:37.610 PM] Received response 'textDocument/codeAction - (21)' in 1ms.
Result: {}
[Trace - 14:02:37.616 PM] Sending request 'textDocument/formatting - (22)'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go"},"options":{"tabSize":4,"insertSpaces":false}}
[Trace - 14:02:37.617 PM] Received response 'textDocument/formatting - (22)' in 0ms.
Result: []
[Trace - 14:02:37.696 PM] Sending notification 'textDocument/didSave'.
Params: {"textDocument":{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","version":15}}
[Trace - 14:02:37.727 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/botfakes/fake_sender.go","diagnostics":[{"range":{"start":{"line":116,"character":19},"end":{"line":116,"character":22}},"severity":1,"source":"compiler","message":"cannot use new(FakeSender) (value of type *FakeSender) as bot.Sender value in variable declaration: wrong type for method SendMessage"}]}
[Trace - 14:02:37.730 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/botfakes/fake_notifier.go","diagnostics":[{"range":{"start":{"line":112,"character":21},"end":{"line":112,"character":24}},"severity":1,"source":"compiler","message":"cannot use new(FakeNotifier) (value of type *FakeNotifier) as bot.Notifier value in variable declaration: wrong type for method NotifyChannelUpdates"}]}
[Trace - 14:02:37.733 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/btest/script_tester.go","diagnostics":[]}
[Trace - 14:02:37.735 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/btest/clock.go","diagnostics":[]}
[Trace - 14:02:37.951 PM] Sending notification 'workspace/didChangeWatchedFiles'.
Params: {"changes":[{"uri":"file:///home/jake/zikaeroh/hortbot/hortbot/internal/bot/a.go","type":2}]}
[Trace - 14:02:48.358 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:48 background imports cache refresh starting"}
[Trace - 14:02:50.020 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2020/02/13 14:02:50 background refresh finished after 1.662976919s\n\tError = \u003cnil\u003e"}
[Trace - 14:03:48.320 PM] Sending request 'shutdown - (23)'.
Params: {}
[Trace - 14:03:48.321 PM] Received response 'shutdown - (23)' in 0ms.
Result: {}
[Trace - 14:03:48.340 PM] Sending notification 'exit'.
Params: null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment