Company: Carousell Pte Ltd Back-End Developer Hiring Test Set 4_16may
Difficulty: medium
Provide review comments in the following code package main import ( "bytes" "encoding/json" "fmt" "log" "net/http" "net/smtp" "os" ) type ShippingRequest struct { OrderID string `json:"order_id"` Address string `json:"address"` Items []string `json:"items"` Method string `json:"method"` } func HandleShipment(orderID string, userID string, address string, items []string, shippingMethod string) { fmt.Printf("Order %s for User %s is ready for shipment to %s.\n", orderID, userID, address) if shippingMethod != "standard" && shippingMethod != "express" { fmt.Println("Error: Unsupported shipping method.") return } fmt.Printf("Shipping via %s...\n", shippingMethod) shippingRequest := ShippingRequest{ OrderID: orderID, Address: address, Items: items, Method: shippingMethod, } requestBody, err := json.Marshal(shippingRequest) if err != nil { fmt.Printf("Error: Could not marshal shipping request: %v\n", err) return } resp, err := http.Post("https://example-shipping-service.com/api/v1/ship