Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Two quick fixes so the plugin works properly (was error-ing previously) #1

Merged
merged 2 commits into from

2 participants

@jnwhiteh

No description provided.

@mattn mattn merged commit d8b36f6 into mattn:master
@mattn
Owner

Good. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 23, 2012
  1. @jnwhiteh

    Use webapi# for http and json

    jnwhiteh authored
  2. @jnwhiteh

    Fix trailing whitespace

    jnwhiteh authored
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +4 −4 ftplugin/go/playground.vim
View
8 ftplugin/go/playground.vim
@@ -11,12 +11,12 @@ endfunction
function! s:playground(bang)
if !executable('curl')
- echoerr "install curl command"
+ echoerr "install curl command"
return
endif
echon 'Compiling and running...'
if a:bang =~ '^!'
- let res = http#post('http://play.golang.org/share', join(getline(1, line('$')), "\n"))
+ let res = webapi#http#post('http://play.golang.org/share', join(getline(1, line('$')), "\n"))
let url = printf('http://play.golang.org/p/%s', res.content)
echo url
let browser = get(g:, 'goplayground_open_browser', '')
@@ -28,8 +28,8 @@ function! s:playground(bang)
let @+ = url
endif
else
- let res = http#post('http://play.golang.org/compile', {"body": join(getline(1, line('$')), "\n")})
- let obj = json#decode(res.content)
+ let res = webapi#http#post('http://play.golang.org/compile', {"body": join(getline(1, line('$')), "\n")})
+ let obj = webapi#json#decode(res.content)
if has_key(obj, 'compile_errors') && len(obj.compile_errors)
echohl WarningMsg | echo obj.compile_errors | echohl None
elseif has_key(obj, 'output')
Something went wrong with that request. Please try again.