Enviar pesquisa
Carregar
コードジェネレートとの付き合い方 @Go Conference 2018 Spring
•
3 gostaram
•
9,470 visualizações
jumpei chikamori
Seguir
コードジェネレートとの付き合い方を実例を交えて紹介します。
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 144
Baixar agora
Baixar para ler offline
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
Mais conteúdo relacionado
Mais procurados
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
Mais procurados
(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
Semelhante 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
Semelhante 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
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
The Digital Insurer
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
The Digital Insurer
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Katpro Technologies
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
The Digital Insurer
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Rafal Los
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
UK Journal
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Drew Madelung
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
wesley chun
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
Puma Security, LLC
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
Pixlogix Infotech
Último
(20)
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your 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
Baixar agora