diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5595772..4cd4ba3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - name: Go vet run: go vet -v - name: Go test - run: go test -v -race -coverprofile=coverage.out -covermode=atomic -failfast + run: go test -v -coverprofile=coverage.out -covermode=atomic -failfast - uses: github/codeql-action/init@v1 with: languages: go diff --git a/check_test.go b/check_test.go index 23121bc..ec29611 100644 --- a/check_test.go +++ b/check_test.go @@ -35,7 +35,7 @@ func TestExists(t *testing.T) { } } -func TestExists_Conccurency(t *testing.T) { +func TestExists_Concurrency(t *testing.T) { rand := strconv.Itoa(rand.Int()) c := cheapcash.Default() diff --git a/delete.go b/delete.go index 92e481d..bf6835c 100644 --- a/delete.go +++ b/delete.go @@ -3,7 +3,7 @@ package cheapcash import "os" func (c *Cache) Delete(key string) error { - check, err := c.Exists(c.Path + "/" + key) + check, err := c.Exists(c.Path + "/" + key) if err != nil { return err } diff --git a/delete_test.go b/delete_test.go index c1a1cb1..97d419b 100644 --- a/delete_test.go +++ b/delete_test.go @@ -24,7 +24,7 @@ func TestDelete(t *testing.T) { } } -func TestDelete_Conccurency(t *testing.T) { +func TestDelete_Concurrency(t *testing.T) { rand := strconv.Itoa(rand.Int()) c := cheapcash.Default() err := c.Write(rand, []byte("value")) diff --git a/reader_test.go b/reader_test.go index 39b69af..a2690b9 100644 --- a/reader_test.go +++ b/reader_test.go @@ -26,7 +26,7 @@ func TestRead(t *testing.T) { } } -func TestRead_Conccurency(t *testing.T) { +func TestRead_Concurrency(t *testing.T) { rand := strconv.Itoa(rand.Int()) c := cheapcash.Default() @@ -37,7 +37,7 @@ func TestRead_Conccurency(t *testing.T) { var wg sync.WaitGroup - readFunc := func(){ + readFunc := func() { r, err := c.Read(rand) if err != nil { t.Error("an error was thrown:", err) diff --git a/writer_test.go b/writer_test.go index bbda709..1ba6df5 100644 --- a/writer_test.go +++ b/writer_test.go @@ -15,25 +15,25 @@ func TestWrite(t *testing.T) { } } -func TestWrite_Conccurency(t *testing.T) { +func TestWrite_Concurrency(t *testing.T) { c := cheapcash.Default() - var wg sync.WaitGroup + var wg sync.WaitGroup - writeFunc := func() { + writeFunc := func() { err := c.Write("key1", []byte("value1")) if err != nil { t.Error("an error was thrown:", err) } - wg.Done() + wg.Done() } wg.Add(5) - go writeFunc() - go writeFunc() - go writeFunc() - go writeFunc() - go writeFunc() + go writeFunc() + go writeFunc() + go writeFunc() + go writeFunc() + go writeFunc() - wg.Wait() + wg.Wait() }