Skip to content

Commit

Permalink
removed unset field
Browse files Browse the repository at this point in the history
Signed-off-by: James Milligan <james@omnant.co.uk>
  • Loading branch information
james-milligan committed Mar 2, 2023
1 parent f907f11 commit 3f97357
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pkg/sync/file/filepath_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
)

type Sync struct {
URI string
Source string
URI string

Logger *logger.Logger
ProviderArgs sync.ProviderArgs
// FileType indicates the file type e.g., json, yaml/yml etc.,
Expand Down Expand Up @@ -134,7 +134,7 @@ func (fs *Sync) sendDataSync(ctx context.Context, syncType sync.Type, dataSync c
}
}

dataSync <- sync.DataSync{FlagData: msg, Source: fs.Source, Type: syncType}
dataSync <- sync.DataSync{FlagData: msg, Source: fs.URI, Type: syncType}
}

func (fs *Sync) fetch(_ context.Context) (string, error) {
Expand Down
2 changes: 0 additions & 2 deletions pkg/sync/file/filepath_sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ func TestSimpleReSync(t *testing.T) {
handler := Sync{
URI: fmt.Sprintf("%s/%s", fetchDirName, fetchFileName),
Logger: logger.NewLogger(nil, false),
Source: fmt.Sprintf("%s/%s", fetchDirName, fetchFileName),
}

for test, tt := range tests {
Expand Down Expand Up @@ -152,7 +151,6 @@ func TestSimpleSync(t *testing.T) {
URI: fmt.Sprintf("%s/%s", fetchDirName, fetchFileName),
Logger: logger.NewLogger(nil, false),
Mux: &msync.RWMutex{},
Source: fmt.Sprintf("%s/%s", fetchDirName, fetchFileName),
}
err := handler.Init(ctx)
if err != nil {
Expand Down

0 comments on commit 3f97357

Please sign in to comment.