Skip to content

Commit

Permalink
Unused parameters are removed following golangci-lint revive errors. (#…
Browse files Browse the repository at this point in the history
…215)

# Describe Request

Unused parameters are removed following golangci-lint revive errors.

# Change Type

Code maintenance.
  • Loading branch information
cinar authored Sep 12, 2024
1 parent d38d1d9 commit 3f77098
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions asset/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func TestSyncFailingTargetAssets(t *testing.T) {

func TestSyncFailingTargetAppend(t *testing.T) {
source := &MockRepository{
GetSinceFunc: func(s string, t time.Time) (<-chan *asset.Snapshot, error) {
GetSinceFunc: func(_ string, _ time.Time) (<-chan *asset.Snapshot, error) {
return helper.SliceToChan([]*asset.Snapshot{}), nil
},
}
Expand All @@ -140,11 +140,11 @@ func TestSyncFailingTargetAppend(t *testing.T) {
return []string{"A"}, nil
},

LastDateFunc: func(s string) (time.Time, error) {
LastDateFunc: func(_ string) (time.Time, error) {
return time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC), nil
},

AppendFunc: func(s string, c <-chan *asset.Snapshot) error {
AppendFunc: func(_ string, _ <-chan *asset.Snapshot) error {
return errors.New("append error")
},
}
Expand Down
8 changes: 4 additions & 4 deletions asset/tiingo_repository_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func TestTiingoRepositoryGet(t *testing.T) {
},
}

server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
body, err := json.Marshal(data)
if err != nil {
t.Fatal(err)
Expand Down Expand Up @@ -79,7 +79,7 @@ func TestTiingoRepositoryGetNotReachable(t *testing.T) {
func TestTiingoRepositoryGetInvalid(t *testing.T) {
response := ""

server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
fmt.Fprint(w, response)
}))

Expand Down Expand Up @@ -123,7 +123,7 @@ func TestTiingoRepositoryLastDate(t *testing.T) {
Description: "D",
}

server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
body, err := json.Marshal(meta)
if err != nil {
t.Fatal(err)
Expand All @@ -149,7 +149,7 @@ func TestTiingoRepositoryLastDate(t *testing.T) {
}

func TestTiingoRepositoryLastDateInvalid(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
server := httptest.NewServer(http.HandlerFunc(func(_ http.ResponseWriter, _ *http.Request) {
}))

repository := asset.NewTiingoRepository("1234")
Expand Down
2 changes: 1 addition & 1 deletion strategy/trend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ Report processes the provided asset snapshots and generates a report annotated w
<a name="KamaStrategy"></a>
## type [KamaStrategy](<https://github.com/cinar/indicator/blob/master/strategy/trend/kama_strategy.go#L16-L19>)

KamaStrategy represents the configuration parameters for calculating the KAMA strategy. A closing price crossing above the KAMA suggests a bullish trend, while crossing below the KAMA indicats a bearish trend.
KamaStrategy represents the configuration parameters for calculating the KAMA strategy. A closing price crossing above the KAMA suggests a bullish trend, while crossing below the KAMA indicates a bearish trend.

```go
type KamaStrategy struct {
Expand Down

0 comments on commit 3f77098

Please sign in to comment.