From f4a6bea4b414702870561f10cb45321591af378b Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Thu, 4 Jul 2019 14:50:49 +0800 Subject: [PATCH] gofmt fix for `No newline at end of file` (#2973) This fix fixes the `\ No newline at end of file` in plugin/chaos/zowners.go, by adding `"\n"` to the end of owners_generate.go. Also fixes a gofmt issue in plugin/etcd/setup.go Signed-off-by: Yong Tang --- owners_generate.go | 2 ++ plugin/chaos/zowners.go | 2 +- plugin/etcd/setup.go | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/owners_generate.go b/owners_generate.go index e198f435f..9764179a0 100644 --- a/owners_generate.go +++ b/owners_generate.go @@ -58,6 +58,8 @@ var Owners = []string{` } golist += fmt.Sprintf("%q%s", a, c) } + // to prevent `No newline at end of file` with gofmt + golist += "\n" if err := ioutil.WriteFile("plugin/chaos/zowners.go", []byte(golist), 0644); err != nil { log.Fatal(err) diff --git a/plugin/chaos/zowners.go b/plugin/chaos/zowners.go index 7d5f296ca..d747069dc 100644 --- a/plugin/chaos/zowners.go +++ b/plugin/chaos/zowners.go @@ -1,4 +1,4 @@ package chaos // Owners are all GitHub handlers of all maintainers. -var Owners = []string{"bradbeam", "chrisohaver", "dilyevsky", "ekleiner", "fastest963", "greenpau", "grobie", "inigohu", "isolus", "johnbelamaric", "miekg", "nchrisdk", "nitisht", "pmoroney", "rajansandeep", "rdrozhdzh", "rtreffer", "stp-ip", "superq", "varyoo", "yongtang"} \ No newline at end of file +var Owners = []string{"bradbeam", "chrisohaver", "dilyevsky", "ekleiner", "fastest963", "greenpau", "grobie", "inigohu", "isolus", "johnbelamaric", "miekg", "nchrisdk", "nitisht", "pmoroney", "rajansandeep", "rdrozhdzh", "rtreffer", "stp-ip", "superq", "varyoo", "yongtang"} diff --git a/plugin/etcd/setup.go b/plugin/etcd/setup.go index 010833bbc..18d3340c5 100644 --- a/plugin/etcd/setup.go +++ b/plugin/etcd/setup.go @@ -9,8 +9,8 @@ import ( mwtls "github.com/coredns/coredns/plugin/pkg/tls" "github.com/coredns/coredns/plugin/pkg/upstream" - etcdcv3 "github.com/coreos/etcd/clientv3" "github.com/caddyserver/caddy" + etcdcv3 "github.com/coreos/etcd/clientv3" ) var log = clog.NewWithPlugin("etcd")