freaking-dell speciaal
This commit is contained in:
34
main.go
34
main.go
@@ -11,6 +11,9 @@ In this project i play around with go. This is my first time writing go, and im
|
||||
// https://stackoverflow.com/questions/16466320/is-there-a-way-to-do-repetitive-tasks-at-intervals, How timer intervals work in GoLang
|
||||
// https://pkg.go.dev/modernc.org/sqlite#section-documentation, how to interface with specifically sqlite in GoLang
|
||||
// https://github.com/mattn/go-sqlite3/blob/v1.14.34/_example/simple/simple.go, How to inferface with a database in GoLang.
|
||||
// https://go.dev/tour/moretypes/6, arrays....
|
||||
// https://go.dev/doc/tutorial/handle-errors, deal with returning errors
|
||||
|
||||
import (
|
||||
"database/sql"
|
||||
"log"
|
||||
@@ -30,7 +33,36 @@ func findParcelProvider(code string, postal_code string)(string, error){
|
||||
return v, nil
|
||||
}
|
||||
}
|
||||
return "", errors.New("parcel not found!")
|
||||
return "", errors.New("Parcel not found in the common providers!")
|
||||
}
|
||||
|
||||
func markPackageSubscription(code string, postal_code string, service string){
|
||||
/*
|
||||
|
||||
{
|
||||
"type": "Shipment",
|
||||
"format": "Default",
|
||||
"service": "parcel-nl",
|
||||
"hook": {
|
||||
"uri": "https://your-server.example.com/dhl-webhook"
|
||||
},
|
||||
"events": [
|
||||
"pre-transit",
|
||||
"transit",
|
||||
"delivered",
|
||||
"failure",
|
||||
"unknown"
|
||||
],
|
||||
"shipmentIDsWithChallengeDetails": [
|
||||
{
|
||||
"shipmentID": "3SABCDEF123456",
|
||||
"postalCode": "1012AB"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user