Enviar búsqueda
Cargar
コードジェネレートとの付き合い方 @Go Conference 2018 Spring
•
3 recomendaciones
•
9,479 vistas
jumpei chikamori
Seguir
コードジェネレートとの付き合い方を実例を交えて紹介します。
Leer menos
Leer más
Tecnología
Denunciar
Compartir
Denunciar
Compartir
1 de 144
Descargar ahora
Descargar para leer sin conexión
Recomendados
Git and git hub
Git and git hub
Kamalnath L P
Introduction to Git
Introduction to Git
Rick Umali
Goのパッケージ管理 @Go合宿2018
Goのパッケージ管理 @Go合宿2018
jumpei chikamori
Candies for everybody: Hacking from 9 to 6
Candies for everybody: Hacking from 9 to 6
Alberto López Martín
goaを使った開発TIPS@六本木一丁目
goaを使った開発TIPS@六本木一丁目
jumpei chikamori
Contributing to Impala
Contributing to Impala
Cloudera, Inc.
Infinum Android Talks #04 - How to publish an Android archive (.aar) to Maven...
Infinum Android Talks #04 - How to publish an Android archive (.aar) to Maven...
Denis_infinum
Gitflow 깃플로우 공유
Gitflow 깃플로우 공유
joonjhokil
Recomendados
Git and git hub
Git and git hub
Kamalnath L P
Introduction to Git
Introduction to Git
Rick Umali
Goのパッケージ管理 @Go合宿2018
Goのパッケージ管理 @Go合宿2018
jumpei chikamori
Candies for everybody: Hacking from 9 to 6
Candies for everybody: Hacking from 9 to 6
Alberto López Martín
goaを使った開発TIPS@六本木一丁目
goaを使った開発TIPS@六本木一丁目
jumpei chikamori
Contributing to Impala
Contributing to Impala
Cloudera, Inc.
Infinum Android Talks #04 - How to publish an Android archive (.aar) to Maven...
Infinum Android Talks #04 - How to publish an Android archive (.aar) to Maven...
Denis_infinum
Gitflow 깃플로우 공유
Gitflow 깃플로우 공유
joonjhokil
BBL Reactive Programming
BBL Reactive Programming
Riadh MNASRI
Open Source Systems Administration
Open Source Systems Administration
All Things Open
SPAと覚悟
SPAと覚悟
Teppei Sato
Protractor under the hood
Protractor under the hood
輝 子安
Tips To Rock At Hackathons
Tips To Rock At Hackathons
3scale
Andrew Mager, Spotify
Andrew Mager, Spotify
Mashery
Using Reactjs in an existing Rails App
Using Reactjs in an existing Rails App
José Luis Torres
A Noob's Journey to the Core
A Noob's Journey to the Core
Ryan Welcher
Content in an Agile World
Content in an Agile World
agrosvenor
Git Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a Boss
tmacwilliam
GitGot: The Swiss Army Chainsaw of Git Repo Management
GitGot: The Swiss Army Chainsaw of Git Repo Management
John Anderson
Go/gRPCはじめました
Go/gRPCはじめました
Yuto Matsukubo
BSides São Paulo - Trabalho no exterior e segurança de aplicações
BSides São Paulo - Trabalho no exterior e segurança de aplicações
Ismael Goncalves
[2010]我有一个梦想
[2010]我有一个梦想
Twinsen Liang
GR8CONF Contributing Back To Grails
GR8CONF Contributing Back To Grails
bobbywarner
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
John Anderson
GitBucket: The perfect Github clone by Scala
GitBucket: The perfect Github clone by Scala
takezoe
既存の資産をXamarinで / Utilize existing assets as Xamarin library
既存の資産をXamarinで / Utilize existing assets as Xamarin library
Yusuke Yamada
海纳百川,有容乃大
海纳百川,有容乃大
hujinpu
Continuous Integration for Pharo Smalltalk Part 2 (Smalltalk and Travis CI)
Continuous Integration for Pharo Smalltalk Part 2 (Smalltalk and Travis CI)
Sho Yoshida
Git isthenewsexy
Git isthenewsexy
Ailsa126
DevSecCon Singapore 2018 - in graph we trust By Imran Mohammed
DevSecCon Singapore 2018 - in graph we trust By Imran Mohammed
DevSecCon
Más contenido relacionado
La actualidad más candente
BBL Reactive Programming
BBL Reactive Programming
Riadh MNASRI
Open Source Systems Administration
Open Source Systems Administration
All Things Open
SPAと覚悟
SPAと覚悟
Teppei Sato
Protractor under the hood
Protractor under the hood
輝 子安
Tips To Rock At Hackathons
Tips To Rock At Hackathons
3scale
Andrew Mager, Spotify
Andrew Mager, Spotify
Mashery
Using Reactjs in an existing Rails App
Using Reactjs in an existing Rails App
José Luis Torres
A Noob's Journey to the Core
A Noob's Journey to the Core
Ryan Welcher
Content in an Agile World
Content in an Agile World
agrosvenor
Git Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a Boss
tmacwilliam
GitGot: The Swiss Army Chainsaw of Git Repo Management
GitGot: The Swiss Army Chainsaw of Git Repo Management
John Anderson
La actualidad más candente
(11)
BBL Reactive Programming
BBL Reactive Programming
Open Source Systems Administration
Open Source Systems Administration
SPAと覚悟
SPAと覚悟
Protractor under the hood
Protractor under the hood
Tips To Rock At Hackathons
Tips To Rock At Hackathons
Andrew Mager, Spotify
Andrew Mager, Spotify
Using Reactjs in an existing Rails App
Using Reactjs in an existing Rails App
A Noob's Journey to the Core
A Noob's Journey to the Core
Content in an Agile World
Content in an Agile World
Git Magic: Versioning Files like a Boss
Git Magic: Versioning Files like a Boss
GitGot: The Swiss Army Chainsaw of Git Repo Management
GitGot: The Swiss Army Chainsaw of Git Repo Management
Similar a コードジェネレートとの付き合い方 @Go Conference 2018 Spring
Go/gRPCはじめました
Go/gRPCはじめました
Yuto Matsukubo
BSides São Paulo - Trabalho no exterior e segurança de aplicações
BSides São Paulo - Trabalho no exterior e segurança de aplicações
Ismael Goncalves
[2010]我有一个梦想
[2010]我有一个梦想
Twinsen Liang
GR8CONF Contributing Back To Grails
GR8CONF Contributing Back To Grails
bobbywarner
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
John Anderson
GitBucket: The perfect Github clone by Scala
GitBucket: The perfect Github clone by Scala
takezoe
既存の資産をXamarinで / Utilize existing assets as Xamarin library
既存の資産をXamarinで / Utilize existing assets as Xamarin library
Yusuke Yamada
海纳百川,有容乃大
海纳百川,有容乃大
hujinpu
Continuous Integration for Pharo Smalltalk Part 2 (Smalltalk and Travis CI)
Continuous Integration for Pharo Smalltalk Part 2 (Smalltalk and Travis CI)
Sho Yoshida
Git isthenewsexy
Git isthenewsexy
Ailsa126
DevSecCon Singapore 2018 - in graph we trust By Imran Mohammed
DevSecCon Singapore 2018 - in graph we trust By Imran Mohammed
DevSecCon
In graph we trust: Microservices, GraphQL and security challenges
In graph we trust: Microservices, GraphQL and security challenges
Mohammed A. Imran
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Rhio Kim
Index 2018 node.js what's next
Index 2018 node.js what's next
Michael Dawson
George Bina: DITA for Developers and GitHub for Technical Writers
George Bina: DITA for Developers and GitHub for Technical Writers
Jack Molisani
maksym vlasov - culture of git as roots of your ci
maksym vlasov - culture of git as roots of your ci
Dariia Seimova
Spark Streamingによるリアルタイムユーザ属性推定
Spark Streamingによるリアルタイムユーザ属性推定
Yoshiyasu SAEKI
5 loaded guns Go hapily aims at your feet
5 loaded guns Go hapily aims at your feet
Márk Sági-Kazár
Tools Bringing Happiness
Tools Bringing Happiness
Konstantin Cherkasov
Impression of Rails 3
Impression of Rails 3
Kosuke Matsuda
Similar a コードジェネレートとの付き合い方 @Go Conference 2018 Spring
(20)
Go/gRPCはじめました
Go/gRPCはじめました
BSides São Paulo - Trabalho no exterior e segurança de aplicações
BSides São Paulo - Trabalho no exterior e segurança de aplicações
[2010]我有一个梦想
[2010]我有一个梦想
GR8CONF Contributing Back To Grails
GR8CONF Contributing Back To Grails
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
Logs Are Magic: Why Git Workflows and Commit Structure Should Matter To You
GitBucket: The perfect Github clone by Scala
GitBucket: The perfect Github clone by Scala
既存の資産をXamarinで / Utilize existing assets as Xamarin library
既存の資産をXamarinで / Utilize existing assets as Xamarin library
海纳百川,有容乃大
海纳百川,有容乃大
Continuous Integration for Pharo Smalltalk Part 2 (Smalltalk and Travis CI)
Continuous Integration for Pharo Smalltalk Part 2 (Smalltalk and Travis CI)
Git isthenewsexy
Git isthenewsexy
DevSecCon Singapore 2018 - in graph we trust By Imran Mohammed
DevSecCon Singapore 2018 - in graph we trust By Imran Mohammed
In graph we trust: Microservices, GraphQL and security challenges
In graph we trust: Microservices, GraphQL and security challenges
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Index 2018 node.js what's next
Index 2018 node.js what's next
George Bina: DITA for Developers and GitHub for Technical Writers
George Bina: DITA for Developers and GitHub for Technical Writers
maksym vlasov - culture of git as roots of your ci
maksym vlasov - culture of git as roots of your ci
Spark Streamingによるリアルタイムユーザ属性推定
Spark Streamingによるリアルタイムユーザ属性推定
5 loaded guns Go hapily aims at your feet
5 loaded guns Go hapily aims at your feet
Tools Bringing Happiness
Tools Bringing Happiness
Impression of Rails 3
Impression of Rails 3
Último
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
Khushali Kathiriya
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
Dropbox
Architecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
Nanddeep Nachan
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Zilliz
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
UiPathCommunity
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
MIND CTI
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Product Anonymous
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
Overkill Security
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
DianaGray10
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
sammart93
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
apidays
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
The Digital Insurer
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
Último
(20)
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
Architecting Cloud Native Applications
Architecting Cloud Native Applications
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
コードジェネレートとの付き合い方 @Go Conference 2018 Spring
1.
Go Conference 2018
Spring @pei0804
2.
3.
4.
• twitter/github @pei0804 •
Hatena tikasan • VOYAGE GROUP 2018 • OSS swaggo: GoDoc Swagger
5.
6.
• • •
7.
8.
9.
10.
11.
database/sql Scan
12.
github.com/variadico/scaneo
13.
$ scaneo hoge.go scans.go
14.
15.
Scan
16.
17.
github.com/variadico/scaneo
18.
19.
• func ScanCategory func
ScanCategories • func ScanCategory func ScanCategorys
20.
Category Categorys
21.
22.
tmpl.go PR
23.
24.
25.
26.
27.
OSS
28.
Fork
29.
Fork &&
30.
OSS
31.
32.
33.
34.
github.com/swaggo/swag
35.
github.com/swaggo/swag Go Swagger Swagger API
※Go
36.
37.
Getting started
38.
$ go get
-u github.com/swaggo/swag/cmd/swag
39.
40.
API
41.
42.
$ swag init
43.
44.
docs/swagger/swagger.json
45.
Swagger UI swaggo
Middleware
46.
47.
http://localhost:8080/swagger/index.html
48.
49.
50.
51.
52.
53.
• • • API • • Swagger
spec
54.
• • • API • • Swagger
spec
55.
※ • @title • @version •
@basepath URI • @host •
56.
57.
58.
parser.go
59.
parser.go
60.
AST go/parser • :
abstract syntax tree AST wikipedia
61.
• Go AST
Hello, World #golang https://qiita.com/tenntenn/items/ 0cbc6f1f00dc579fcd8c • Go Go https://motemen.github.io/go-for-go-book/
62.
ParseFile • Go • fset
*token.FileSet, filename string, src interface{}, mode Mode • *ast.File, error
63.
ast.File
64.
ast.File
65.
66.
parser.go
67.
• • • API • • Swagger
spec
68.
API ( ) ※ •
@param • @success • @failure • @router • @accept, @produce MimeType
69.
70.
71.
parser.go
72.
parser.go
73.
parser.go
74.
parser.go
75.
parser.go
76.
parser.go
77.
parser.go
78.
OK
79.
80.
81.
// @Success 200
{array} model.Account "User" @Success {param }
82.
83.
α
84.
85.
// @Param default
query string false "string default" default(A) Swagger
86.
// @Param default
query string false "string default" Enums(A, B ,C) default(A)
87.
🤔
88.
// @Param default
query string false "string default" Enums(A, B ,C) default(A) // @Param default query string false "string default" Enums(A, B ,C) default(A)
89.
😇
90.
91.
Model
92.
@Param account body
model.Account ~~ model Account Model
93.
AST TypeDefinitions map[string]map[string]*ast.TypeSpec map[ ][
] AST model TypeDefinitions["model"]["Account"] model Account AST
94.
95.
96.
• • •
97.
• • •
98.
99.
parser.go
100.
parser.go
101.
parser.go
102.
parser.go
103.
parser.go
104.
• • •
105.
106.
parser.go
107.
parser.go
108.
109.
110.
111.
112.
😇
113.
114.
115.
116.
117.
118.
User Family User Family User Family User Family
User panic
119.
• • •
120.
🤔
121.
• • •
122.
123.
parser.go
124.
parser.go
125.
User Family User Family User Family User Family
User panic
126.
User Family User Family User Family User Family
User panic
127.
😂
128.
• • • API • • Swagger
spec
129.
github.com/go-openapi/spec
130.
github.com/go-openapi/spec Swagger2.0 spec go-swagger/go-swagger Swagger
131.
3.0 github.com/go-openapi/spec3
132.
Swagger
133.
134.
135.
• •
136.
•
137.
138.
139.
140.
141.
OSS swaggo welcome
142.
• github.com/mercari/go-httpdoc • github.com/goadesign/goa DSL
Swagger • github.com/cheekybits/genny Go
143.
• Go https://www.slideshare.net/lestrrat/go-86436442 •
go generate go/ast https://speakerdeck.com/masashisalvador57f/ast-falsezatukuritositahua • go generate http://agtn.hatenablog.com/entry/2017/08/06/015813
Descargar ahora