From 5c2d27cd4adbf517a15b7b4644098fa42d69df19 Mon Sep 17 00:00:00 2001 From: xengineering Date: Mon, 27 Mar 2023 20:08:07 +0200 Subject: Apply `go fmt` to all files --- hs100.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'hs100.go') diff --git a/hs100.go b/hs100.go index c972f8a..ff25576 100644 --- a/hs100.go +++ b/hs100.go @@ -1,5 +1,3 @@ -// vim: shiftwidth=4 tabstop=4 noexpandtab - package main import ( @@ -21,7 +19,7 @@ type Hs100 struct { // Hs100Conf is the configuration of one TP-Link HS100 smart plug. type Hs100Conf struct { - Ip net.IP + Ip net.IP Name string } @@ -72,7 +70,7 @@ func send(address string, data []byte) error { // create a Dialer with context var d net.Dialer - ctx, cancel := context.WithTimeout(context.Background(), 3 * time.Second) + ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second) defer cancel() // establish connection @@ -113,6 +111,6 @@ func set(host string, state string) error { return err } err = send(address, data) - + return err } -- cgit v1.2.3-70-g09d2