From 72a263d346f818fa53452bdfdb21ccca55071fd2 Mon Sep 17 00:00:00 2001 From: Harrison Cramer Date: Mon, 28 Aug 2023 08:25:30 -0400 Subject: [PATCH] Bugfix: Fixes server.start() command --- README.md | 2 +- lua/gitlab/async.lua | 2 +- lua/gitlab/server.lua | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 0a87dbf..0284c58 100644 --- a/README.md +++ b/README.md @@ -210,7 +210,7 @@ This plugin uses a Golang server to reach out to Gitlab. It's possible that some ``` :lua require("gitlab.server").build() -:lua require("gitlab.server").start() +:lua require("gitlab.server").start(function() print("Server started") end) ``` You can directly interact with the Go server like any other process: diff --git a/lua/gitlab/async.lua b/lua/gitlab/async.lua index f1ddec5..3a2d3e1 100644 --- a/lua/gitlab/async.lua +++ b/lua/gitlab/async.lua @@ -57,7 +57,7 @@ M.sequence = function(dependencies, cb) return end - server.start_server(function() + server.start(function() state.go_server_running = true handler:fetch(dependencies, 1) end) diff --git a/lua/gitlab/server.lua b/lua/gitlab/server.lua index 9f1c9c9..be073ba 100644 --- a/lua/gitlab/server.lua +++ b/lua/gitlab/server.lua @@ -1,13 +1,13 @@ -- This module contains the logic responsible for building and starting -- the Golang server. The Go server is responsible for making API calls -- to Gitlab and returning the data -local job = require("gitlab.job") -local state = require("gitlab.state") -local u = require("gitlab.utils") -local M = {} +local job = require("gitlab.job") +local state = require("gitlab.state") +local u = require("gitlab.utils") +local M = {} -- Starts the Go server and call the callback provided -M.start_server = function(callback) +M.start = function(callback) local command = state.settings.bin .. " " .. state.settings.project_id