Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Building An Editor Package For Go
Search
Joe Fitzgerald
July 24, 2014
Technology
8
1.1k
Building An Editor Package For Go
A lightning talk for the Denver Gophers Meetup On 7/24/2014.
Joe Fitzgerald
July 24, 2014
Tweet
Share
Other Decks in Technology
See All in Technology
いまからでも遅くない!コンテナでWebアプリを動かしてみよう入門(2-2)WebAPIハンズオン
nomu
0
150
KaigiOnRails2024
igaiga
6
2.9k
WebRTC と AI の組み合わせ
tnoho
0
450
What's in a Postgres major release? An analysis of contributions in the v17 timeframe | Claire Giordano | PGConf EU 2024
clairegiordano
1
660
入門『状態』#kaigionrails / "state" for beginners with Rails
shinkufencer
2
750
APIテスト自動化の勘所
yokawasa
2
210
リファクタリングへの耐性が高いモデルベースの統合テストの紹介 / Model-Base Integration Test for Refactoring
yuitosato
5
1.2k
生成AI×マルチテナントSaaSな新規事業を立ち上げる上でテックリードとして気を使った点の紹介
lunastera
0
510
強すぎるIAMをCloudTrailを使って適正化した話
yjszk
0
230
ActiveRecord SQLインジェクションクイズ (Rails 7.1.3.4)
kozy4324
9
2k
ZOZOのデータマネジメントの取り組み:これまでとこれから / ZOZO's Data Management Initiatives
takagiyudai
0
550
Capybara+生成AIでどこまで本当に自然言語のテストを書けるか?
yusukeiwaki
6
740
Featured
See All Featured
Producing Creativity
orderedlist
PRO
341
39k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
13
1.9k
Rails Girls Zürich Keynote
gr2m
93
13k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
BBQ
matthewcrist
85
9.3k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
[RailsConf 2023] Rails as a piece of cake
palkan
50
4.8k
It's Worth the Effort
3n
183
27k
Agile that works and the tools we love
rasmusluckow
327
21k
Transcript
BUILDING AN EDITOR PLUGIN PACKAGE FOR GO Joe Fitzgerald, DIRECTOR,
CLOUD FOUNDRY SERVICES @ PIVOTAL
MEET JOE ▸ I work @ (http://pivotal.io) ▸ I sell
and deliver professional services for ▸ You can find me at: ▸ : @joefitzgerald ▸ : @joefitzgerald ▸ :
[email protected]
AND... SINCE MARCH I'VE BEEN WORKING ON A GO PACKAGE
FOR ATOM
I KNOW WHAT YOU ARE THINKING...
YOU ARE CRAZY BECAUSE I : Vim, Emacs, Sublime, IntelliJ,
Eclipse, LiteIDE... Acme (?)
None
YOU'RE RIGHT I'M NOT HERE TO CHANGE YOUR MIND
SO WHY'D YOU DO IT?
IT WAS MARCH AND IT SOUNDED LIKE A GOOD IDEA
(?)
MEET ATOM ▸ Built By: ▸ Find It At: atom.io
▸ License: MIT – Yes, It's Open Source!
BUT... + = SLOW, RIGHT?
REACT THE DEFAULT EDITOR VIEW AS OF JULY 23, 2014
= Much Faster
I CREATED A PACKAGE IT'S CALLED: go-plus
RIGHT NOW IT SUPPORTS: ▸ Formatting source using gofmt ▸
Formatting and managing imports using goimports ▸ Code quality inspection using go vet ▸ Linting using golint ▸ Syntax checking using go build and go test ▸ Display of test coverage using go test -coverprofile
None
None
None
None
A TOUR OF VERSION 1:
None
I MADE SOME ROOKIE MISTAKES (BUT I'M NOT SO SURE
OTHERS HAVE REALIZED IT) (BECAUSE THESE SEEM LIKE COMMON EDITOR MISTAKES)
WHY SHOULD SOMEONE HAVE TO CONFIGURE THE PATH TO TOOLS?
LIKE gofmt
WOULDN'T IT BE BETTER TO USE... go env ?
$ go env GOARCH="amd64" GOBIN="" GOCHAR="6" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="darwin" GOOS="darwin"
GOPATH="/Users/jfitzgerald/go" GORACE="" GOROOT="/usr/local/Cellar/go/1.3/libexec" GOTOOLDIR="/usr/local/Cellar/go/1.3/libexec/pkg/tool/darwin_amd64" CC="clang" GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common" CXX="clang++" CGO_ENABLED="1"
GOBIN="" + GOEXE="" + GOPATH="/Users/jfitzgerald/go" + GOROOT="/usr/local/Cellar/go/1.3/libexec" + GOTOOLDIR="/usr/local/Cellar/go/1.3/libexec/pkg/tool/darwin_amd64" IS
EVERYTHING YOU NEED TO FIND GO TOOLS (PLUS $PATH / %Path%)
SO WE JUST NEED TO FIND go
WHERE IS GO, YOU ASK? 1. Start With $PATH /
%PATH% Segments, Then: 2. OSX: /usr/local/go/bin (Package Installer) 3. OSX: /usr/local/bin (Homebrew) 4. Windows: C:\Go\bin (Package Installer)
SO NOW WE CAN FIND: 1. go 2. godoc 3.
gofmt 4. vet 5. cover
BUT WHAT ABOUT: 1. goimports 2. golint 3. oracle 4.
And Other $GOPATH / %GOPATH% Bin Executables? They aren't in GOTOOLDIR or GOROOT...
THEY BE HERE, SOMEWHERE: 1. Start With $PATH / %PATH%
Segments, Then: 2. Look In $GOBIN / %GOBIN% 3. Look In $GOPATH / %GOPATH% Segments In The bin Directory
AND THEN IF YOU CAN'T FIND THEM, OFFER TO: go
get -u THE REQUIRED TOOLS! (THERE IS NO MAGIC, THIS CAN BE DISABLED)
THIS REVELATION LED TO go-plus V2 (PLUS A LOAD OF
OTHER INTERNAL AWESOMENESS) TO PREPARE FOR THE ADDITION OF:
AUTOCOMPLETE (POWERED BY gocode)
ORACLE (POWERED BY oracle) ;)
GO TO DEFINITION (POWERED BY godef)
GO TO DOCUMENTATION (POWERED BY godoc)
AND ctags SUPPORT (POWERED BY gotags)
ALSO THE PACKAGE IS WRITTEN IN COFFEESCRIPT (Yeah, I Made
A Few Mistakes As I Learned CoffeeScript) IS THIS AS IRONIC TO YOU AS IT IS TO ME?
AND ON THAT BOMBSHELL... Goodnight GOT ANY QUESTIONS? TWITTER: @JOEFITZGERALD