mirror of
https://github.com/zrepl/zrepl.git
synced 2024-11-24 09:24:09 +01:00
lint: add lint checking for time.Equal (#841)
No issues found, tested that the lint works by changing code locally. fixes https://github.com/zrepl/zrepl/issues/5
This commit is contained in:
parent
2923009689
commit
dc05cd00f2
@ -1,7 +1,12 @@
|
|||||||
linters:
|
linters:
|
||||||
enable:
|
enable:
|
||||||
- goimports
|
- goimports
|
||||||
|
- revive
|
||||||
|
|
||||||
|
linters-settings:
|
||||||
|
revive:
|
||||||
|
rules:
|
||||||
|
- name: time-equal
|
||||||
issues:
|
issues:
|
||||||
exclude-rules:
|
exclude-rules:
|
||||||
- path: _test\.go
|
- path: _test\.go
|
||||||
|
@ -122,7 +122,7 @@ func (v FilesystemVersion) String() string { return v.RelName() }
|
|||||||
// are immutable over time in ZFS.
|
// are immutable over time in ZFS.
|
||||||
func FilesystemVersionEqualIdentity(a, b FilesystemVersion) bool {
|
func FilesystemVersionEqualIdentity(a, b FilesystemVersion) bool {
|
||||||
// .Name is mutable
|
// .Name is mutable
|
||||||
return a.Guid == b.Guid && a.CreateTXG == b.CreateTXG && a.Creation == b.Creation
|
return a.Guid == b.Guid && a.CreateTXG == b.CreateTXG && a.Creation.Equal(b.Creation)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (v FilesystemVersion) ToAbsPath(p *DatasetPath) string {
|
func (v FilesystemVersion) ToAbsPath(p *DatasetPath) string {
|
||||||
|
Loading…
Reference in New Issue
Block a user