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
Compile Time Code Weaving with Go
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Ian Eyberg
July 10, 2015
Technology
0
380
Compile Time Code Weaving with Go
Goweave is a project to implement compile-time code weaving with go.
Ian Eyberg
July 10, 2015
Tweet
Share
More Decks by Ian Eyberg
See All by Ian Eyberg
Creating Open Source Unikernel Packages
eyberg
0
63
Challenges and Opportunities - Unikernels in HPC && Cloud
eyberg
0
100
Climbing Out From the Digital Mud with Unikernels - HL2017
eyberg
0
180
Using Unikernels in Production Today
eyberg
0
240
Adventures In Building Unikernel Clouds
eyberg
0
120
No Parachute Introduction into Unikernel Orchestration
eyberg
0
270
You Say MicroServices - I say Unikernels
eyberg
1
220
The Current State of C++ Unikernels
eyberg
1
260
UniKernel Workflows
eyberg
0
110
Other Decks in Technology
See All in Technology
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.6k
Data Hubグループ 紹介資料
sansan33
PRO
0
2.7k
名刺メーカーDevグループ 紹介資料
sansan33
PRO
0
1k
超初心者からでも大丈夫!オープンソース半導体の楽しみ方〜今こそ!オレオレチップをつくろう〜
keropiyo
0
110
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
230
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.3k
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
210
ZOZOにおけるAI活用の現在 ~開発組織全体での取り組みと試行錯誤~
zozotech
PRO
5
5.1k
【5分でわかる】セーフィー エンジニア向け会社紹介
safie_recruit
0
42k
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
1
350
All About Sansan – for New Global Engineers
sansan33
PRO
1
1.3k
クレジットカード決済基盤を支えるSRE - 厳格な監査とSRE運用の両立 (SRE Kaigi 2026)
capytan
6
2.7k
Featured
See All Featured
Designing for Performance
lara
610
70k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
170
GraphQLとの向き合い方2022年版
quramy
50
14k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
770
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
130
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
52k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
140
Bash Introduction
62gerente
615
210k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Visualization
eitanlees
150
17k
Leo the Paperboy
mayatellez
4
1.4k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
410
Transcript
Compile Time Code Weaving with Go https://github.com/deferpanic/goweave
I like your software but…
What sucks about Go?
Do you know about aspectj?
Really?
I’m not a code purist
“which is our full time job . write a program
to write a program” - rob pike / gopherfest 2015
None
Go is Actually a Decent Fit
Prior Art go fmt go fix go generate
go fix
No Wrapping I don’t want to update code && leave
the refs in it’s non-trivial I don’t want to hack it in/out each time I could forget in the future or not find all in the past
Aspect Contains behavior that is prominent in many places but
don’t really have anything to do with your business logic. Logging is a canonical example.
Pointcut an expression that details where to apply your behavior
CALL Before, after or wrap around calling a method. EXECUTE Before or after inside executing a method. WITHIN Every single call within a method.
Advice fmt.Println("Hello, 世界")
Logging
Monitoring
Performance Analysis
Debugging & Tracing
Undo Functionality
None
Behavior Mutation
Security
Transactions
Log every call to Itoa
Validation
Time Database Query Latencies
Ensure we log every panic in a goroutine
loom central place for storing .weave files you don’t have
to re-invent the wheel more eyes - better software
it’s really
HACKY
https://github.com/deferpanic/goweave https://github.com/deferpanic/loom