FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
gitlab.nvim/lua/gitlab/version.lua at develop · harrisoncramer/gitlab.nvim · GitHub
harrisoncramer
gitlab.nvim
Repository navigation
Code
Issues
12
(12)
Pull requests
5
(5)
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
gitlab.nvim
/
lua
/
gitlab
/
version.lua
Copy path
More file actions
More file actions
Latest commit
History
History
History
29 lines (24 loc) · 798 Bytes
Breadcrumbs
gitlab.nvim
/
lua
/
gitlab
/
version.lua
Copy path
File metadata and controls
29 lines (24 loc) · 798 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
27
28
29
local
M
=
{}
local
minimum_go_version
=
"
1.25.1
"
---
Return true if Go is available and its version is supported by the plugin.
---
@return
boolean
M
.
is_go_valid
=
function
()
local
has_go
,
go
=
pcall
(
vim
.
system
, {
"
go
"
,
"
version
"
})
if
not
has_go
then
return
false
end
local
go_version
=
vim
.
version
.
parse
(
go
:
wait
().
stdout
, {
strict
=
false
})
return
go_version
~=
nil
and
vim
.
version
.
ge
(
go_version
,
minimum_go_version
)
end
---
Return error if the Go version is not valid.
---
@return
string
?
M
.
check_go_version
=
function
()
local
has_version
=
M
.
is_go_valid
()
if
not
has_version
then
return
string.format
(
"
Go is not installed, or version is older than %s. Please reinstall up-to-date Go version: https://go.dev/dl/
"
,
minimum_go_version
)
end
end
return
M
Back
|
FazBrowse Home
|
New Git URL