Skip to content

Commit

Permalink
force ids to be unique
Browse files Browse the repository at this point in the history
  • Loading branch information
timburks committed Oct 18, 2024
1 parent 9260481 commit f4bd604
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmd/stores-server/stores.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func readStores(filename string) ([]*storespb.Store, error) {
}
reader := csv.NewReader(file)
reader.Read()
for {
for i := 0; true; i++ {
fields, err := reader.Read()
if err == io.EOF {
break
Expand All @@ -51,8 +51,7 @@ func readStores(filename string) ([]*storespb.Store, error) {
}
store := &storespb.Store{
// United States Post Office,401,North Ashley Drive,Tampa,FL,33602,27.9473718,-82.4595414

Name: idFromField(fields[0]),
Name: idFromField(fmt.Sprintf("%d:%s", i, fields[0])),
Type: "office",
Title: fields[0],
Location: &storespb.Location{
Expand Down

0 comments on commit f4bd604

Please sign in to comment.