Mon Apr 27 17:15:22 2020 UTC ()
Add devel/go-cmp Version 0.4.0
go-cmp is a package for equality of Go values.
This package is intended to be a more powerful and safer alternative
to reflect.DeepEqual for comparing whether two values are semantically
equal.
The primary features of cmp are:
- When the default behavior of equality does not suit the needs of the
test, custom equality functions can override the equality
operation. For example, an equality function may report floats as
equal so long as they are within some tolerance of each other.
- Types that have an Equal method may use that method to determine
equality. This allows package authors to determine the equality
operation for the types that they define.
- If no custom equality functions are used and no Equal method is
defined, equality is determined by recursively comparing the
primitive kinds on both values, much like reflect.DeepEqual. Unlike
reflect.DeepEqual, unexported fields are not compared by default;
they result in panics unless suppressed by using an Ignore option
(see cmpopts.IgnoreUnexported) or explicitly compared using the
AllowUnexported option.
(nikita)
diff -r1.3112 -r1.3113 pkgsrc/devel/Makefile
diff -r0 -r1.1 pkgsrc/devel/go-cmp/DESCR
diff -r0 -r1.1 pkgsrc/devel/go-cmp/Makefile
diff -r0 -r1.1 pkgsrc/devel/go-cmp/PLIST
diff -r0 -r1.1 pkgsrc/devel/go-cmp/buildlink3.mk
diff -r0 -r1.1 pkgsrc/devel/go-cmp/distinfo
--- pkgsrc/devel/Makefile 2020/04/27 16:31:22 1.3112
+++ pkgsrc/devel/Makefile 2020/04/27 17:15:22 1.3113
| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.3112 2020/04/27 16:31:22 nikita Exp $ | | 1 | # $NetBSD: Makefile,v 1.3113 2020/04/27 17:15:22 nikita Exp $ |
2 | # | | 2 | # |
3 | | | 3 | |
4 | COMMENT= Development utilities | | 4 | COMMENT= Development utilities |
5 | | | 5 | |
6 | SUBDIR+= ETL | | 6 | SUBDIR+= ETL |
7 | SUBDIR+= ExmanIDE | | 7 | SUBDIR+= ExmanIDE |
8 | SUBDIR+= GConf | | 8 | SUBDIR+= GConf |
9 | SUBDIR+= GConf-ui | | 9 | SUBDIR+= GConf-ui |
10 | SUBDIR+= Gorm | | 10 | SUBDIR+= Gorm |
11 | SUBDIR+= MoarVM | | 11 | SUBDIR+= MoarVM |
12 | SUBDIR+= ObjectiveLib | | 12 | SUBDIR+= ObjectiveLib |
13 | SUBDIR+= ProjectCenter | | 13 | SUBDIR+= ProjectCenter |
14 | SUBDIR+= R-BH | | 14 | SUBDIR+= R-BH |
| @@ -375,26 +375,27 @@ SUBDIR+= gnustep-make | | | @@ -375,26 +375,27 @@ SUBDIR+= gnustep-make |
375 | SUBDIR+= gnustep-objc | | 375 | SUBDIR+= gnustep-objc |
376 | SUBDIR+= gnustep-objc-lf2 | | 376 | SUBDIR+= gnustep-objc-lf2 |
377 | SUBDIR+= go-afero | | 377 | SUBDIR+= go-afero |
378 | SUBDIR+= go-amber | | 378 | SUBDIR+= go-amber |
379 | SUBDIR+= go-appengine | | 379 | SUBDIR+= go-appengine |
380 | SUBDIR+= go-argv | | 380 | SUBDIR+= go-argv |
381 | SUBDIR+= go-assert | | 381 | SUBDIR+= go-assert |
382 | SUBDIR+= go-blackfriday | | 382 | SUBDIR+= go-blackfriday |
383 | SUBDIR+= go-buffruneio | | 383 | SUBDIR+= go-buffruneio |
384 | SUBDIR+= go-bytebufferpool | | 384 | SUBDIR+= go-bytebufferpool |
385 | SUBDIR+= go-cast | | 385 | SUBDIR+= go-cast |
386 | SUBDIR+= go-check | | 386 | SUBDIR+= go-check |
387 | SUBDIR+= go-cli | | 387 | SUBDIR+= go-cli |
| | | 388 | SUBDIR+= go-cmp |
388 | SUBDIR+= go-cobra | | 389 | SUBDIR+= go-cobra |
389 | SUBDIR+= go-colorable | | 390 | SUBDIR+= go-colorable |
390 | SUBDIR+= go-colortext | | 391 | SUBDIR+= go-colortext |
391 | SUBDIR+= go-colour | | 392 | SUBDIR+= go-colour |
392 | SUBDIR+= go-compress | | 393 | SUBDIR+= go-compress |
393 | SUBDIR+= go-consul-api | | 394 | SUBDIR+= go-consul-api |
394 | SUBDIR+= go-cpuid | | 395 | SUBDIR+= go-cpuid |
395 | SUBDIR+= go-debounce | | 396 | SUBDIR+= go-debounce |
396 | SUBDIR+= go-ed25519 | | 397 | SUBDIR+= go-ed25519 |
397 | SUBDIR+= go-emoji | | 398 | SUBDIR+= go-emoji |
398 | SUBDIR+= go-errors | | 399 | SUBDIR+= go-errors |
399 | SUBDIR+= go-flags-svent | | 400 | SUBDIR+= go-flags-svent |
400 | SUBDIR+= go-fnmatch | | 401 | SUBDIR+= go-fnmatch |
go-cmp is a package for equality of Go values.
This package is intended to be a more powerful and safer alternative
to reflect.DeepEqual for comparing whether two values are semantically
equal.
The primary features of cmp are:
- When the default behavior of equality does not suit the needs of the
test, custom equality functions can override the equality
operation. For example, an equality function may report floats as
equal so long as they are within some tolerance of each other.
- Types that have an Equal method may use that method to determine
equality. This allows package authors to determine the equality
operation for the types that they define.
- If no custom equality functions are used and no Equal method is
defined, equality is determined by recursively comparing the
primitive kinds on both values, much like reflect.DeepEqual. Unlike
reflect.DeepEqual, unexported fields are not compared by default;
they result in panics unless suppressed by using an Ignore option
(see cmpopts.IgnoreUnexported) or explicitly compared using the
AllowUnexported option.
# $NetBSD: Makefile,v 1.1 2020/04/27 17:15:22 nikita Exp $
DISTNAME= go-cmp-0.4.0
MASTER_SITES= ${MASTER_SITE_GITHUB:=google/}
CATEGORIES= devel
GITHUB_PROJECT= go-cmp
GITHUB_TAG= v${PKGVERSION_NOREV}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://github.com/google/go-cmp
COMMENT= Package for comparing Go values in tests
LICENSE= modified-bsd
GO_DIST_BASE= ${DISTNAME}
GO_SRCPATH= github.com/google/go-cmp
.include "../../devel/go-xerrors/buildlink3.mk"
.include "../../lang/go/go-package.mk"
.include "../../mk/bsd.pkg.mk"
@comment $NetBSD: PLIST,v 1.1 2020/04/27 17:15:22 nikita Exp $
gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp.a
gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/cmpopts.a
gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/diff.a
gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/flags.a
gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/function.a
gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/testprotos.a
gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/teststructs.a
gopkg/pkg/${GO_PLATFORM}/github.com/google/go-cmp/cmp/internal/value.a
gopkg/src/github.com/google/go-cmp/CONTRIBUTING.md
gopkg/src/github.com/google/go-cmp/LICENSE
gopkg/src/github.com/google/go-cmp/README.md
gopkg/src/github.com/google/go-cmp/cmp/cmpopts/equate.go
gopkg/src/github.com/google/go-cmp/cmp/cmpopts/ignore.go
gopkg/src/github.com/google/go-cmp/cmp/cmpopts/sort.go
gopkg/src/github.com/google/go-cmp/cmp/cmpopts/struct_filter.go
gopkg/src/github.com/google/go-cmp/cmp/cmpopts/util_test.go
gopkg/src/github.com/google/go-cmp/cmp/cmpopts/xform.go
gopkg/src/github.com/google/go-cmp/cmp/compare.go
gopkg/src/github.com/google/go-cmp/cmp/compare_test.go
gopkg/src/github.com/google/go-cmp/cmp/example_reporter_test.go
gopkg/src/github.com/google/go-cmp/cmp/example_test.go
gopkg/src/github.com/google/go-cmp/cmp/export_panic.go
gopkg/src/github.com/google/go-cmp/cmp/export_unsafe.go
gopkg/src/github.com/google/go-cmp/cmp/internal/diff/debug_disable.go
gopkg/src/github.com/google/go-cmp/cmp/internal/diff/debug_enable.go
gopkg/src/github.com/google/go-cmp/cmp/internal/diff/diff.go
gopkg/src/github.com/google/go-cmp/cmp/internal/diff/diff_test.go
gopkg/src/github.com/google/go-cmp/cmp/internal/flags/flags.go
gopkg/src/github.com/google/go-cmp/cmp/internal/flags/toolchain_legacy.go
gopkg/src/github.com/google/go-cmp/cmp/internal/flags/toolchain_recent.go
gopkg/src/github.com/google/go-cmp/cmp/internal/function/func.go
gopkg/src/github.com/google/go-cmp/cmp/internal/function/func_test.go
gopkg/src/github.com/google/go-cmp/cmp/internal/testprotos/protos.go
gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/project1.go
gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/project2.go
gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/project3.go
gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/project4.go
gopkg/src/github.com/google/go-cmp/cmp/internal/teststructs/structs.go
gopkg/src/github.com/google/go-cmp/cmp/internal/value/pointer_purego.go
gopkg/src/github.com/google/go-cmp/cmp/internal/value/pointer_unsafe.go
gopkg/src/github.com/google/go-cmp/cmp/internal/value/sort.go
gopkg/src/github.com/google/go-cmp/cmp/internal/value/sort_test.go
gopkg/src/github.com/google/go-cmp/cmp/internal/value/zero.go
gopkg/src/github.com/google/go-cmp/cmp/internal/value/zero_test.go
gopkg/src/github.com/google/go-cmp/cmp/options.go
gopkg/src/github.com/google/go-cmp/cmp/options_test.go
gopkg/src/github.com/google/go-cmp/cmp/path.go
gopkg/src/github.com/google/go-cmp/cmp/report.go
gopkg/src/github.com/google/go-cmp/cmp/report_compare.go
gopkg/src/github.com/google/go-cmp/cmp/report_reflect.go
gopkg/src/github.com/google/go-cmp/cmp/report_slices.go
gopkg/src/github.com/google/go-cmp/cmp/report_text.go
gopkg/src/github.com/google/go-cmp/cmp/report_value.go
gopkg/src/github.com/google/go-cmp/go.mod
gopkg/src/github.com/google/go-cmp/go.sum
# $NetBSD: buildlink3.mk,v 1.1 2020/04/27 17:15:22 nikita Exp $
BUILDLINK_TREE+= go-cmp
.if !defined(GO_CMP_BUILDLINK3_MK)
GO_CMP_BUILDLINK3_MK:=
BUILDLINK_CONTENTS_FILTER.go-cmp= ${EGREP} gopkg/
BUILDLINK_DEPMETHOD.go-cmp?= build
BUILDLINK_API_DEPENDS.go-cmp+= go-cmp>=0.4.0
BUILDLINK_PKGSRCDIR.go-cmp?= ../../devel/go-cmp
.endif # GO_CMP_BUILDLINK3_MK
BUILDLINK_TREE+= -go-cmp
$NetBSD: distinfo,v 1.1 2020/04/27 17:15:22 nikita Exp $
SHA1 (go-cmp-0.4.0.tar.gz) = 9a75761c56d72ff0a50eccaa014f315811796a13
RMD160 (go-cmp-0.4.0.tar.gz) = dbb7e95152e5bb674920901352bebe0ae0bdcd68
SHA512 (go-cmp-0.4.0.tar.gz) = f848f5509189e14019eea56abde0e1fdf64a0de666b56270cfbd8832a656376273e3b71be556e0b637f69304c5b7099f1af4e069d6e025961dbafecf969e90ab
Size (go-cmp-0.4.0.tar.gz) = 81600 bytes