diff --git a/protocol/nativemodel_unix.go b/protocol/nativemodel_unix.go index 3c387902f..1bdb2c00d 100644 --- a/protocol/nativemodel_unix.go +++ b/protocol/nativemodel_unix.go @@ -12,22 +12,22 @@ type nativeModel struct { next Model } -func (m nativeModel) Index(nodeID string, repo string, files []FileInfo) { +func (m nativeModel) Index(nodeID NodeID, repo string, files []FileInfo) { m.next.Index(nodeID, repo, files) } -func (m nativeModel) IndexUpdate(nodeID string, repo string, files []FileInfo) { +func (m nativeModel) IndexUpdate(nodeID NodeID, repo string, files []FileInfo) { m.next.IndexUpdate(nodeID, repo, files) } -func (m nativeModel) Request(nodeID, repo string, name string, offset int64, size int) ([]byte, error) { +func (m nativeModel) Request(nodeID NodeID, repo string, name string, offset int64, size int) ([]byte, error) { return m.next.Request(nodeID, repo, name, offset, size) } -func (m nativeModel) ClusterConfig(nodeID string, config ClusterConfigMessage) { +func (m nativeModel) ClusterConfig(nodeID NodeID, config ClusterConfigMessage) { m.next.ClusterConfig(nodeID, config) } -func (m nativeModel) Close(nodeID string, err error) { +func (m nativeModel) Close(nodeID NodeID, err error) { m.next.Close(nodeID, err) } diff --git a/protocol/nativemodel_windows.go b/protocol/nativemodel_windows.go index 5bb7fe982..92e4110f5 100644 --- a/protocol/nativemodel_windows.go +++ b/protocol/nativemodel_windows.go @@ -26,7 +26,7 @@ type nativeModel struct { next Model } -func (m nativeModel) Index(nodeID string, repo string, files []FileInfo) { +func (m nativeModel) Index(nodeID NodeID, repo string, files []FileInfo) { for i, f := range files { if strings.ContainsAny(f.Name, disallowedCharacters) { files[i].Flags |= FlagInvalid @@ -37,7 +37,7 @@ func (m nativeModel) Index(nodeID string, repo string, files []FileInfo) { m.next.Index(nodeID, repo, files) } -func (m nativeModel) IndexUpdate(nodeID string, repo string, files []FileInfo) { +func (m nativeModel) IndexUpdate(nodeID NodeID, repo string, files []FileInfo) { for i, f := range files { if strings.ContainsAny(f.Name, disallowedCharacters) { files[i].Flags |= FlagInvalid @@ -48,15 +48,15 @@ func (m nativeModel) IndexUpdate(nodeID string, repo string, files []FileInfo) { m.next.IndexUpdate(nodeID, repo, files) } -func (m nativeModel) Request(nodeID, repo string, name string, offset int64, size int) ([]byte, error) { +func (m nativeModel) Request(nodeID NodeID, repo string, name string, offset int64, size int) ([]byte, error) { name = filepath.FromSlash(name) return m.next.Request(nodeID, repo, name, offset, size) } -func (m nativeModel) ClusterConfig(nodeID string, config ClusterConfigMessage) { +func (m nativeModel) ClusterConfig(nodeID NodeID, config ClusterConfigMessage) { m.next.ClusterConfig(nodeID, config) } -func (m nativeModel) Close(nodeID string, err error) { +func (m nativeModel) Close(nodeID NodeID, err error) { m.next.Close(nodeID, err) }