Permalink
Browse files

altitude to int32

  • Loading branch information...
peter-edge committed Jan 16, 2017
1 parent 8cc9077 commit a0cf2d5380862bda776db7b5617cca759bc8011c
Showing with 90 additions and 82 deletions.
  1. +5 −1 cmd/openflights/main.go
  2. +1 −1 id_store.go
  3. +6 −1 openflights.go
  4. +77 −77 openflights.pb.go
  5. +0 −1 openflights.pb.gw.go
  6. +1 −1 openflights.proto
@@ -143,7 +143,11 @@ func getClient(address string) (openflights.Client, error) {
}
return openflights.NewClient(openflights.NewAPIClient(clientConn)), nil
}
return openflights.NewDefaultServerClient()
return openflights.NewDefaultServerClientWithOptions(
openflights.CodeStoreOptions{
LogFunc: func(string, ...interface{}) {},
},
)
}

func printSingle(message proto.Message) error {
@@ -199,7 +199,7 @@ func getAirportForRecord(record []string) (*Airport, error) {
Icao: record[5],
LatitudeMicros: int32(latitudeMicros),
LongitudeMicros: int32(longitudeMicros),
AltitudeFeet: uint32(altitudeFeet),
AltitudeFeet: int32(altitudeFeet),
TimezoneOffsetMinutes: int32(timezoneOffsetMinutes),
Dst: DST(dstValue),
Timezone: record[11],
@@ -107,11 +107,16 @@ func NewServerClient(idStore *IDStore, options CodeStoreOptions) (Client, error)

// NewDefaultServerClient creates a new server-side Client from the generated CSVStore.
func NewDefaultServerClient() (Client, error) {
return NewDefaultServerClientWithOptions(CodeStoreOptions{})
}

// NewDefaultServerClientWithOptions creates a new server-side Client from the generated CSVStore with CodeStoreOptions.
func NewDefaultServerClientWithOptions(options CodeStoreOptions) (Client, error) {
idStore, err := newIDStore(_GlobalCSVStore)
if err != nil {
return nil, err
}
return NewServerClient(idStore, CodeStoreOptions{})
return NewServerClient(idStore, options)
}

// Codes returns the airport codes.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -42,7 +42,7 @@ message Airport {
string icao = 6;
sint32 latitude_micros = 7;
sint32 longitude_micros = 8;
uint32 altitude_feet = 9;
int32 altitude_feet = 9;
sint32 timezone_offset_minutes = 10;
DST dst = 11;
string timezone = 12;

0 comments on commit a0cf2d5

Please sign in to comment.