package main import ( "log" "xengineering.eu/iot-core/communication" ) func main() { ports, err := communication.GetStSerials() if err != nil { log.Fatal(err) } if len(ports) != 1 { log.Fatalf("Require exactly one serial port from STMicroelectronics but %d attached", len(ports)) } log.Printf("Detected port: %s\n", ports[0]) }