-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
44 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,23 @@ | ||
build_x86: | ||
GOOS=darwin GOARCH=amd64 go build -o formattag-amd64 main.go | ||
build_macOS_x86: | ||
GOOS=darwin GOARCH=amd64 go build -o formattag-macOS-amd64 main.go | ||
|
||
build_m1: | ||
GOOS=darwin GOARCH=arm64 go build -o formattag-arm64 main.go | ||
build_macOS_arm: | ||
GOOS=darwin GOARCH=arm64 go build -o formattag-macOS-arm64 main.go | ||
|
||
build: build_x86 build_m1 | ||
build_macOS: build_macOS_arm build_macOS_x86 | ||
|
||
build_linux_x86: | ||
GOOS=linux GOARCH=amd64 go build -o formattag-linux-amd64 main.go | ||
|
||
build_linux_arm64: | ||
GOOS=linux GOARCH=arm64 go build -o formattag-linux-arm64 main.go | ||
|
||
build_linux_386: | ||
GOOS=linux GOARCH=386 go build -o formattag-linux-386 main.go | ||
|
||
build_linux: build_linux_386 build_linux_arm64 build_linux_x86 | ||
|
||
build: build_linux build_macOS | ||
|
||
tar: | ||
tar zcvf formattag.tar.gz formattag-amd64 formattag-arm64 | ||
tar zcvf formattag.tar.gz formattag-macOS-amd64 formattag-macOS-arm64 formattag-linux-amd64 formattag-linux-arm64 formattag-linux-386 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
" Copyright 2021 momaek. All rights reserved. | ||
" Use of this source code is governed by a BSD-style | ||
" license that can be found in the LICENSE file. | ||
" | ||
" This filetype plugin add a new commands for go buffers: | ||
" | ||
" :PrettyTag | ||
" | ||
" Run formattag for the current Go file. | ||
" | ||
if exists("b:did_ftplugin_go_pretty_tag") | ||
finish | ||
endif | ||
|
||
if !executable("formattag") | ||
finish | ||
endif | ||
|
||
command! -buffer PrettyTag call s:GoPrettyTag() | ||
|
||
function! s:GoPrettyTag() abort | ||
cexpr system('formattag -file ' . shellescape(expand('%'))) | ||
endfunction | ||
|
||
let b:did_ftplugin_go_pretty_tag = 1 |