Refactor TED Calendar and EForm Structure for Enhanced Functionality
- Updated the GetOJS function to accept a base URL parameter, improving flexibility in constructing the calendar URL. - Removed the deprecated eform.go file, streamlining the codebase by eliminating unused components. - Introduced new eform structures for BusinessRegistrationInformationNotice, ContractNotice, ContractAwardNotice, and PriorInformationNotice, enhancing the handling of TED XML data. - Implemented mapping functions to convert eform notices to the Tender entity, improving integration with the tender management system. - Added a service layer to encapsulate business logic related to eform processing, adhering to Clean Architecture principles.
This commit is contained in:
+3
-3
@@ -10,15 +10,15 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
calendarUrl = "https://ted.europa.eu/en/release-calendar/-/download/file/CSV/%d"
|
||||
calendarUrl = "%s/en/release-calendar/-/download/file/CSV/%d"
|
||||
)
|
||||
|
||||
// Get OJS Number
|
||||
func GetOJS(year int, date string) (string, error) {
|
||||
func GetOJS(baseURL string, year int, date string) (string, error) {
|
||||
var (
|
||||
ojs string
|
||||
)
|
||||
url := fmt.Sprintf(calendarUrl, year)
|
||||
url := fmt.Sprintf(calendarUrl, baseURL, year)
|
||||
|
||||
resp, err := http.Get(url)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user