doc: fix typo

This commit is contained in:
jichangjun 2020-06-19 15:00:11 +08:00
parent 0bbcb862a8
commit 64fe1e5f1a
3 changed files with 4 additions and 5 deletions

View File

@ -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 enricofoltran/simple-go-server/main.go:74.46,76.4 1 0
... ...
``` ```
Enjoy, Have Fun!
## RoadMap ## RoadMap
- [x] Support code coverage collection for system testing. - [x] Support code coverage collection for system testing.

View File

@ -220,13 +220,13 @@ func registerSelf(address string) ([]byte, error) {
resp, err := http.DefaultClient.Do(req) resp, err := http.DefaultClient.Do(req)
if err != nil && isNetworkError(err) { 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) resp, err = http.DefaultClient.Do(req)
} }
defer resp.Body.Close() defer resp.Body.Close()
if err != nil { 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) body, err := ioutil.ReadAll(resp.Body)
@ -235,7 +235,7 @@ func registerSelf(address string) ([]byte, error) {
} }
if resp.StatusCode != 200 { 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 return body, err

View File

@ -92,7 +92,7 @@ var _ = Describe("E2E", func() {
Expect(err).To(BeNil(), "the binary cannot be disassembled") Expect(err).To(BeNil(), "the binary cannot be disassembled")
cnt := strings.Count(string(out), "GoCover") 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") cnt = strings.Count(string(out), "main.registerSelf")
Expect(cnt).To(BeNumerically(">", 0), "main.registerSelf function should be in the binary") Expect(cnt).To(BeNumerically(">", 0), "main.registerSelf function should be in the binary")