From 64fe1e5f1a07136fe18a226d36c87a12a41264c2 Mon Sep 17 00:00:00 2001 From: jichangjun Date: Fri, 19 Jun 2020 15:00:11 +0800 Subject: [PATCH] doc: fix typo --- README.md | 1 - pkg/cover/instrument.go | 6 +++--- tests/e2e/simple_project_test.go | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index f8d039b..82433f3 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,6 @@ Goc can collect code coverages at runtime for your long-run golang applications. enricofoltran/simple-go-server/main.go:74.46,76.4 1 0 ... ``` - Enjoy, Have Fun! ## RoadMap - [x] Support code coverage collection for system testing. diff --git a/pkg/cover/instrument.go b/pkg/cover/instrument.go index d30a9fe..ab4d396 100644 --- a/pkg/cover/instrument.go +++ b/pkg/cover/instrument.go @@ -220,13 +220,13 @@ func registerSelf(address string) ([]byte, error) { resp, err := http.DefaultClient.Do(req) if err != nil && isNetworkError(err) { - log.Printf("[goc][WARN]error occured:%v, try again", err) + log.Printf("[goc][WARN]error occurred:%v, try again", err) resp, err = http.DefaultClient.Do(req) } defer resp.Body.Close() if err != nil { - return nil, fmt.Errorf("registed faile, err:%v", err) + return nil, fmt.Errorf("failed to register into coverage center, err:%v", err) } body, err := ioutil.ReadAll(resp.Body) @@ -235,7 +235,7 @@ func registerSelf(address string) ([]byte, error) { } if resp.StatusCode != 200 { - err = fmt.Errorf("registed failed, response code %d", resp.StatusCode) + err = fmt.Errorf("failed to register into coverage center, response code %d", resp.StatusCode) } return body, err diff --git a/tests/e2e/simple_project_test.go b/tests/e2e/simple_project_test.go index b189289..d560067 100644 --- a/tests/e2e/simple_project_test.go +++ b/tests/e2e/simple_project_test.go @@ -92,7 +92,7 @@ var _ = Describe("E2E", func() { Expect(err).To(BeNil(), "the binary cannot be disassembled") cnt := strings.Count(string(out), "GoCover") - Expect(cnt).To(BeNumerically(">", 0), "GoCover varibale should be in the binary") + Expect(cnt).To(BeNumerically(">", 0), "GoCover variable should be in the binary") cnt = strings.Count(string(out), "main.registerSelf") Expect(cnt).To(BeNumerically(">", 0), "main.registerSelf function should be in the binary")