Skip to content

Commit

Permalink
chore: Fix formatting
Browse files Browse the repository at this point in the history
* chore: Add result link to report badge
  • Loading branch information
mehmetumit committed Nov 7, 2023
1 parent a21b586 commit 4e2c5da
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1 align="center">dexus</h1>
<p align="center">
<img src="https://github.com/mehmetumit/dexus/actions/workflows/build-test.yaml/badge.svg"/>
<img src="https://goreportcard.com/badge/github.com/mehmetumit/dexus"/>
<a href="https://goreportcard.com/report/github.com/mehmetumit/dexus"><img src="https://goreportcard.com/badge/github.com/mehmetumit/dexus"/></a>
<a href="https://codecov.io/gh/mehmetumit/dexus"><img src="https://img.shields.io/codecov/c/github/mehmetumit/dexus/master.svg"/></a>
<img src="https://github.com/mehmetumit/dexus/actions/workflows/release.yaml/badge.svg"/>
<a href="https://github.com/mehmetumit/dexus/stargazers"><img src="https://img.shields.io/github/stars/mehmetumit/dexus?color=yellow" alt="Stars"/></a>
Expand Down
8 changes: 4 additions & 4 deletions internal/adapters/fileredirect/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
)

var (
ErrStoreIsNotInitialized = errors.New("store is not initialized")
ErrUnableToOpenYamlFile = errors.New("unable to open the file")
ErrStoreIsNotInitialized = errors.New("store is not initialized")
ErrUnableToOpenYamlFile = errors.New("unable to open the file")
ErrUnableToDecodeYamlFile = errors.New("unable to decode yaml file")
)

Expand All @@ -30,8 +30,8 @@ func initStore(logger ports.Logger, filePath string) (*RedirectionStore, error)
f, err := os.Open(filepath.FromSlash(filePath))
defer func() {
err := f.Close()
if err != nil{
logger.Error("unable to close file:",err)
if err != nil {
logger.Error("unable to close file:", err)
}
}()
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/adapters/memcache/memcache.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type MemCache struct {

func NewMemCache(l ports.Logger) *MemCache {
return &MemCache{
logger: l,
logger: l,
cacheMap: make(CacheMap),
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func TestProxyResponseWriter_Write(t *testing.T) {
recorder := httptest.NewRecorder()
proxyWriter := newTestResponseWriter(t, recorder)
_, err := proxyWriter.Write([]byte(data))
if err != nil{
if err != nil {
t.Fatal("unable to write data to response writer:", err)
}
if !bytes.Equal(recorder.Body.Bytes(), []byte(data)) {
Expand Down

0 comments on commit 4e2c5da

Please sign in to comment.