Instantly share code, notes, and snippets.

View swagger.json
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Swagger API Team"
},
View model.go
package hoge
type ErrorModel struct {
Code int32
Message string
}
type NewPet struct {
Name string
Tag string
View swagger.json
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Swagger Petstore",
"description": "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification",
"termsOfService": "http://swagger.io/terms/",
"contact": {
"name": "Swagger API Team"
},
View example5.go
package main
import (
"fmt"
)
type Dependency struct {
World string
}
View example4.go
package main
import (
"fmt"
)
type Dependency struct {
World string
}
View example3.go
package main
import (
"fmt"
)
// 歩く機能、食べる機能を持っているものは動物である。
type Animal interface {
Walk()
Eat()
View example2.go
package main
import (
"fmt"
)
type Human struct {
Name string
Age int
}
View example1.go
package main
import (
"fmt"
)
func main() {
// example variable declaration
foo := "foo"
// Java