Skip to content

Commit

Permalink
up go
Browse files Browse the repository at this point in the history
  • Loading branch information
geraldb committed Nov 20, 2014
1 parent b749805 commit b882d33
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions go_http_api.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ Includes sportkit - starter kit for HTTP JSON API - Go Edition -> [`github.com/s

# Go Structs, Structs, Structs

`database_structs.go`:
`sportkit/database_structs.go`:

~~~
type Event struct {
Expand All @@ -65,7 +65,7 @@ type Team struct {
}
~~~

NOTE: Go Ids (Names) starting with capital letter (upper case) are public (by definition).
NOTE: Go ids (names) starting with capital letter (upper case) are public (by definition).

~~~
type JsEvent struct {
Expand All @@ -83,7 +83,7 @@ type JsTeam struct {

# Database Queries

`database_finders.go`:
`sportkit/database_finders.go`:

~~~
query :=
Expand Down Expand Up @@ -138,7 +138,7 @@ func FetchEvents() []Event {
}
~~~

NOTE: Go has NO exceptions; function (almost) always returns err codes.
NOTE: Go has NO exceptions; function (almost) always returns error (`err`) types.

Why no exceptions? Go's headline feature is concurrency (w/ Go (co)routines and channels) -
exceptions do NOT really work in an (asynchronous) concurrent world.
Expand Down

0 comments on commit b882d33

Please sign in to comment.