Skip to content

Commit

Permalink
osmpbf examples: fix small typos
Browse files Browse the repository at this point in the history
  • Loading branch information
bdon authored and paulmach committed Jan 10, 2024
1 parent 63649b3 commit fbd6841
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions osmpbf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,21 @@ file, err := os.Open("./delaware-latest.osm.pbf")
if err != nil {
panic(err)
}
defer f.Close()
defer file.Close()

// The third parameter is the number of parallel decoders to use.
scanner := osmpbf.New(context.Background(), file, runtime.GOMAXPROCS(-1))
defer scanner.Close()

for scanner.Scan() {
switch o := scanner.Object().(type)
switch o := scanner.Object().(type) {
case *osm.Node:

case *osm.Way:

case *osm.Relation:

}
}

if err := scanner.Err(); err != nil {
Expand Down

0 comments on commit fbd6841

Please sign in to comment.