Skip to content

Commit

Permalink
bugfix: Replace the value when spacetrack give the same norad id mult…
Browse files Browse the repository at this point in the history
…iple time, and warn the user #1
  • Loading branch information
Tsukoyachi committed Jun 4, 2024
1 parent 81a9ae4 commit dcfe1a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion service/initlization.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ func NewSatelliteService() *SatelliteService {
}
// check if the object id is already in the map
if _, ok := calculatedMap[tle.NORAD_CAT_ID]; ok {
log.Fatalf("NORAD_CAT_ID %v is already in the map", tle.OBJECT_ID)
log.Warnf("NORAD_CAT_ID %v is already in the map, latest version taken into account", tle.OBJECT_ID)
}

calculatedMap[tle.NORAD_CAT_ID] = tle

}
Expand Down
5 changes: 2 additions & 3 deletions spacetrack/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import (
"fmt"
"net/url"
"os"
)
import "github.com/go-resty/resty/v2"

import (
"github.com/go-resty/resty/v2"

log "github.com/sirupsen/logrus"
)

Expand Down

0 comments on commit dcfe1a1

Please sign in to comment.