comparator

package
v1.7.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>

Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

View Source
var (
	RWMutexComparer = Comparer(func(x, y *sync.RWMutex) bool {
		return reflect.DeepEqual(x, y)
	})

	// skipcq: VET-V0008
	MutexComparer = Comparer(func(x, y sync.Mutex) bool {

		return reflect.DeepEqual(x, y)
	})

	CondComparer = Comparer(func(x, y *sync.Cond) bool {
		return reflect.DeepEqual(x, y)
	})

	ErrorComparer = Comparer(func(x, y error) bool {
		return errors.Is(x, y)
	})

	// skipcq: VET-V0008
	OnceComparer = Comparer(func(x, y sync.Once) bool {

		return reflect.DeepEqual(x, y)
	})

	// skipcq: VET-V0008
	WaitGroupComparer = Comparer(func(x, y sync.WaitGroup) bool {

		return reflect.DeepEqual(x, y)
	})

	// skipcq: VET-V0008
	AtomicUint64Comparator = Comparer(func(x, y atomic.Uint64) bool {

		return reflect.DeepEqual(x, y)
	})
)
View Source
var (
	AllowUnexported  = cmp.AllowUnexported
	IgnoreUnexported = cmpopts.IgnoreUnexported
	Comparer         = cmp.Comparer
	Diff             = cmp.Diff
	Equal            = cmp.Equal
	IgnoreTypes      = cmpopts.IgnoreTypes
	IgnoreFields     = cmpopts.IgnoreFields
	Exporter         = cmp.Exporter
	FilterPath       = cmp.FilterPath
	Ignore           = cmp.Ignore
)

Functions

This section is empty.

Types

type Option

type Option = cmp.Option

func CompareField added in v1.2.1

func CompareField(field string, cmp Option) Option

type Path added in v0.0.63

type Path = cmp.Path

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL