This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"os" | |
"github.com/google/go-github/github" | |
"golang.org/x/oauth2" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/.drone.sec b/.drone.sec | |
index f1a10a2..28b15e3 100644 | |
--- a/.drone.sec | |
+++ b/.drone.sec | |
@@ -1 +1 @@ | |
-eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.M2qFghvswadLY_OZqIAlf8RUgWQIZH5F6wL7g1DNmRDp8IzLmRltg0bbb8cDK2qJcG8STL2gi9m_SrW9bHrwR87Mg4SFYM50-RISmVh3-vTJpbKhZiGqW27xb9b0wOufJKSCWPKNtQK7mCpfO9aZMSGbMcln8aMJUyZt4povZVxRm8H1sq6KOEetg8eRYkAmbThche2KQQv3wU061dr0CaHHcdXZhrFWOuV4XlvWsB-yjpxntNksZQOCdDZ3dZHdJPdtt3AqnfkxqyGl16Q7fC1MUwDANwCvuD-omnvgGsQHybpsr2nmrG3Ce8ysMaO4Dkyv5d4M6qwHJRZfEfH1ew.W9jt_Vq4V41j1yuz.dSRr2SDGBDOMctB5RBLMhgk3w-wr9JnqCqxI02Tl_rIeXwbXsJi7Qutao1Nx8KFVB3umc7HLcizJd1KK9bwezSye2hoc3EvKBdFy4InuOKhrb7EW4bziRdE9x6e2ACAccYbZ1_Cn_-nklRP-SE0dA5C7mwzIFIbbUZlkp581nmuHmNQxzKEtmuIytm1rQnDjJD6q4aYx3gBFuA0-HPtb.43ijUiX-PTBYt9O95cuF-Q | |
\ No newline at end of file | |
+eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.GVCyMNII0AoQKyoZuVoy90AR5hhc5qKNDK8GEjaLS2xo1Kx3saLnkryg8DuOCE-Avf0O62toDYD0VIgXi6mtN5flf0JLAYdV_A6DZXfim3RVVzTBmHwVeeYwSt1K4TcOi_AT5iuXDLPj9Af87xdB7FMAvFr9hqOiCqA1_Oa2Zn-9BtzYVto_SXwrmPxM0K0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"log" | |
"github.com/google/go-github/github" | |
) | |
func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ gosumcheck github.com/mackerelio/... | |
/home/haya14busa/src/github.com/mackerelio/mkr/alerts.go:127:3: uncovered cases for github.com/mackerelio/mackerel-client-go.Monitor type switch: | |
- *github.com/mackerelio/mackerel-client-go.MonitorExpression | |
$ gosumcheck golang.org/x/tools/... | |
/home/haya14busa/src/golang.org/x/tools/cmd/godex/print.go:95:5: uncovered cases for go/types.Object type switch: | |
- *go/types.Nil | |
- *go/types.Label | |
- *go/types.PkgName | |
- *go/types.object | |
/home/haya14busa/src/golang.org/x/tools/cmd/guru/definition.go:163:4: uncovered cases for go/ast.Decl type switch: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// source: https://github.com/golang/go/blob/d54b60a2b2470ea42559b58995e86ff20dd70471/src/go/ast/ast.go | |
type Node interface { | |
Pos() token.Pos | |
End() token.Pos | |
} | |
type Expr interface { | |
Node | |
exprNode() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! s:func() abort | |
" hoge | |
endfunction | |
function! ParseBySyntax() abort | |
let lines = getline(1, '$') | |
for [lnum, l] in map(lines, {i,l -> [i+1, l]}) | |
echo '---' | |
echo lnum l |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/monitors.go b/monitors.go | |
index c8a32aa..5d861b4 100644 | |
--- a/monitors.go | |
+++ b/monitors.go | |
@@ -2,8 +2,11 @@ package mackerel | |
import ( | |
"encoding/json" | |
+ "errors" | |
"fmt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inoremap <Plug>(loooooooooooooooooooooooooooooooooong) <C-r>=DoComplete()<CR> | |
function! DoComplete() abort | |
call complete(col('.'), ['a', 'b', 'c']) | |
return '' | |
endfunction | |
imap <C-y> <Plug>(loooooooooooooooooooooooooooooooooong) | |
map <Plug>(testlooooooooooooooong) <Nop> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
inoremap <Plug>(loooooooooooooooooooooooooooooooooong) <C-r>=DoComplete()<CR> | |
function! DoComplete() abort | |
call complete(col('.'), ['a', 'b', 'c']) | |
return '' | |
endfunction | |
imap <C-y> <Plug>(loooooooooooooooooooooooooooooooooong) | |
" :call feedkeys("i\<Plug>(loooooooooooooooooooooooooooooooooong)", 'm') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" vim-metarepeat provides an operator (like) mapping which runs dot repeat for | |
" every occurence matched by last pattern (@/) in range (specified by motion or | |
" textobject). | |
" | |
" vim-metarepeat is inspired by 'Occurrence modifier, preset-occurrence, | |
" persistence-selection' feature | |
" http://qiita.com/t9md/items/0bc7eaff726d099943eb#occurrence-modifier-preset-occurrence-persistence-selection | |
" | |
" But it's not a port of these feature. In similar to vim-mode-plus terms, | |
" vim-metarepeat provides 'preset-operation-for-occurence' feature (it's just |