Go: Add gotype support (#1099)

This commit is contained in:
Jelte Fennema authored and w0rp committed 2018-01-07 12:11:01 +00:00
1 parent c9d66b861b
commit b6d1c41925
6 files changed
+51 -2

No files matched your search

+7
View File
@@ -236,6 +236,13 @@ function! ale#util#EscapePCRE(unsafe_string) abort
return substitute(a:unsafe_string, '\([\-\[\]{}()*+?.^$|]\)', '\\\1', 'g')
endfunction
" Escape a string so that it can be used as a literal string inside an evaled
" vim command.
function! ale#util#EscapeVim(unsafe_string) abort
return "'" . substitute(a:unsafe_string, "'", "''", 'g') . "'"
endfunction
" Given a String or a List of String values, try and decode the string(s)
" as a JSON value which can be decoded with json_decode. If the JSON string
" is invalid, the default argument value will be returned instead.