mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-08-24 09:31:07 +08:00
Upgrade blevesearch dependency to v2.0.1 (#14346)
* Upgrade blevesearch dependency to v2.0.1 * Update rupture to v1.0.0 * Fix test
This commit is contained in:
go.modgo.summodules.txt
modules/indexer
vendor
github.com
blevesearch
bleve
index
v2
.gitignore.travis.ymlCONTRIBUTING.mdLICENSEREADME.mdindex_alias.goindex_alias_impl.goindex_impl.goindex_meta.goindex_stats.gomapping.go
analysis
builder.goconfig.goconfig_app.goconfig_disk.godoc.godocument
document.gofield.gofield_boolean.gofield_composite.gofield_datetime.gofield_geopoint.gofield_numeric.gofield_text.go
error.gogeo
go.modgo.sumindex.goindex
scorch
README.mdbuilder.goempty.goevent.goint.gointroducer.gomerge.go
mergeplan
optimize.gopersister.goregexp.gorollback.goscorch.gosegment_plugin.gosnapshot_index.gosnapshot_index_dict.gosnapshot_index_doc.gosnapshot_index_tfr.gosnapshot_segment.gostats.gounadorned.goupsidedown
mapping
numeric
query.goregistry
analyzer.gocache.gochar_filter.godatetime_parser.gofragment_formatter.gofragmenter.gohighlighter.goindex_type.goregistry.gostore.gotoken_filter.gotoken_maps.gotokenizer.go
search.gosearch
collector.go
collector
explanation.gofacet
facets_builder.gohighlight
levenshtein.gopool.goquery
bool_field.goboolean.goboost.goconjunction.godate_range.godisjunction.godocid.gofuzzy.gogeo_boundingbox.gogeo_boundingpolygon.gogeo_distance.gomatch.gomatch_all.gomatch_none.gomatch_phrase.gomulti_phrase.gonumeric_range.gophrase.goprefix.goquery.goquery_string.goquery_string.yquery_string.y.goquery_string_lex.goquery_string_parser.goregexp.goterm.goterm_range.gowildcard.go
scorer
search.gosearcher
ordered_searchers_list.gosearch_boolean.gosearch_conjunction.gosearch_disjunction.gosearch_disjunction_heap.gosearch_disjunction_slice.gosearch_docid.gosearch_filter.gosearch_fuzzy.gosearch_geoboundingbox.gosearch_geopointdistance.gosearch_geopolygon.gosearch_match_all.gosearch_match_none.gosearch_multi_term.gosearch_numeric_range.gosearch_phrase.gosearch_regexp.gosearch_term.gosearch_term_prefix.gosearch_term_range.go
sort.goutil.gosize
bleve_index_api
.golangci.ymlLICENSEREADME.mdanalysis.gobatch.godocument.gofreq.gogo.modgo.sumindex.goindexing_options.gooptimize.gosizes.go
scorch_segment_api
upsidedown_store_api
zap/v15
zapx
v11
.gitignore.golangci.ymlLICENSEREADME.mdbuild.gocontentcoder.gocount.godict.godocvalues.goenumerator.gogo.modgo.sumintcoder.gomemuvarint.gomerge.gonew.goplugin.goposting.goread.gosegment.gosizes.gowrite.gozap.md
v12
.gitignore.golangci.ymlLICENSEREADME.mdbuild.gochunk.gocontentcoder.gocount.godict.godocvalues.goenumerator.gogo.modgo.sumintDecoder.gointcoder.gomemuvarint.gomerge.gonew.goplugin.goposting.goread.gosegment.gosizes.gowrite.gozap.md
v13
.gitignore.golangci.ymlLICENSEREADME.mdbuild.gochunk.gocontentcoder.gocount.godict.godocvalues.goenumerator.gogo.modgo.sumintDecoder.gointcoder.gomemuvarint.gomerge.gonew.goplugin.goposting.goread.gosegment.gosizes.gowrite.gozap.md
v14
.gitignore.golangci.ymlLICENSEREADME.mdbuild.gochunk.gocontentcoder.gocount.godict.godocvalues.goenumerator.gogo.modgo.sumintDecoder.gointcoder.gomemuvarint.gomerge.gonew.goplugin.goposting.goread.gosegment.gosizes.gowrite.gozap.md
v15
ethantkoenig/rupture
stretchr/testify
golang.org/x/sys
unix
mkerrors.shptrace_darwin.goptrace_ios.gosyscall_darwin.gosyscall_darwin_386.gosyscall_darwin_amd64.gosyscall_darwin_arm.gosyscall_darwin_arm64.gosyscall_illumos.gosyscall_solaris.gotimestruct.gozerrors_linux.gozerrors_linux_386.gozerrors_linux_amd64.gozerrors_linux_arm.gozerrors_linux_arm64.gozerrors_linux_mips.gozerrors_linux_mips64.gozerrors_linux_mips64le.gozerrors_linux_mipsle.gozerrors_linux_ppc64.gozerrors_linux_ppc64le.gozerrors_linux_riscv64.gozerrors_linux_s390x.gozerrors_linux_sparc64.gozsyscall_darwin_386.gozsyscall_darwin_amd64.gozsyscall_darwin_arm.gozsyscall_darwin_arm64.gozsyscall_illumos_amd64.gozsyscall_solaris_amd64.gozsysnum_linux_386.gozsysnum_linux_amd64.gozsysnum_linux_arm.gozsysnum_linux_arm64.gozsysnum_linux_mips.gozsysnum_linux_mips64.gozsysnum_linux_mips64le.gozsysnum_linux_mipsle.gozsysnum_linux_ppc64.gozsysnum_linux_ppc64le.gozsysnum_linux_riscv64.gozsysnum_linux_s390x.gozsysnum_linux_sparc64.goztypes_aix_ppc.goztypes_aix_ppc64.goztypes_dragonfly_amd64.goztypes_freebsd_386.goztypes_freebsd_amd64.goztypes_freebsd_arm.goztypes_freebsd_arm64.goztypes_linux.goztypes_linux_386.goztypes_linux_amd64.goztypes_linux_arm.goztypes_linux_arm64.goztypes_linux_mips.goztypes_linux_mips64.goztypes_linux_mips64le.goztypes_linux_mipsle.goztypes_linux_ppc64.goztypes_linux_ppc64le.goztypes_linux_riscv64.goztypes_linux_s390x.goztypes_linux_sparc64.goztypes_netbsd_386.goztypes_netbsd_amd64.goztypes_netbsd_arm.goztypes_netbsd_arm64.goztypes_openbsd_386.goztypes_openbsd_amd64.goztypes_openbsd_arm.goztypes_openbsd_arm64.goztypes_openbsd_mips64.goztypes_solaris_amd64.go
windows
81
vendor/github.com/stretchr/testify/assert/assertion_order.go
generated
vendored
Normal file
81
vendor/github.com/stretchr/testify/assert/assertion_order.go
generated
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
package assert
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"reflect"
|
||||
)
|
||||
|
||||
// isOrdered checks that collection contains orderable elements.
|
||||
func isOrdered(t TestingT, object interface{}, allowedComparesResults []CompareType, failMessage string, msgAndArgs ...interface{}) bool {
|
||||
objKind := reflect.TypeOf(object).Kind()
|
||||
if objKind != reflect.Slice && objKind != reflect.Array {
|
||||
return false
|
||||
}
|
||||
|
||||
objValue := reflect.ValueOf(object)
|
||||
objLen := objValue.Len()
|
||||
|
||||
if objLen <= 1 {
|
||||
return true
|
||||
}
|
||||
|
||||
value := objValue.Index(0)
|
||||
valueInterface := value.Interface()
|
||||
firstValueKind := value.Kind()
|
||||
|
||||
for i := 1; i < objLen; i++ {
|
||||
prevValue := value
|
||||
prevValueInterface := valueInterface
|
||||
|
||||
value = objValue.Index(i)
|
||||
valueInterface = value.Interface()
|
||||
|
||||
compareResult, isComparable := compare(prevValueInterface, valueInterface, firstValueKind)
|
||||
|
||||
if !isComparable {
|
||||
return Fail(t, fmt.Sprintf("Can not compare type \"%s\" and \"%s\"", reflect.TypeOf(value), reflect.TypeOf(prevValue)), msgAndArgs...)
|
||||
}
|
||||
|
||||
if !containsValue(allowedComparesResults, compareResult) {
|
||||
return Fail(t, fmt.Sprintf(failMessage, prevValue, value), msgAndArgs...)
|
||||
}
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// IsIncreasing asserts that the collection is increasing
|
||||
//
|
||||
// assert.IsIncreasing(t, []int{1, 2, 3})
|
||||
// assert.IsIncreasing(t, []float{1, 2})
|
||||
// assert.IsIncreasing(t, []string{"a", "b"})
|
||||
func IsIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
|
||||
return isOrdered(t, object, []CompareType{compareLess}, "\"%v\" is not less than \"%v\"", msgAndArgs)
|
||||
}
|
||||
|
||||
// IsNonIncreasing asserts that the collection is not increasing
|
||||
//
|
||||
// assert.IsNonIncreasing(t, []int{2, 1, 1})
|
||||
// assert.IsNonIncreasing(t, []float{2, 1})
|
||||
// assert.IsNonIncreasing(t, []string{"b", "a"})
|
||||
func IsNonIncreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
|
||||
return isOrdered(t, object, []CompareType{compareEqual, compareGreater}, "\"%v\" is not greater than or equal to \"%v\"", msgAndArgs)
|
||||
}
|
||||
|
||||
// IsDecreasing asserts that the collection is decreasing
|
||||
//
|
||||
// assert.IsDecreasing(t, []int{2, 1, 0})
|
||||
// assert.IsDecreasing(t, []float{2, 1})
|
||||
// assert.IsDecreasing(t, []string{"b", "a"})
|
||||
func IsDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
|
||||
return isOrdered(t, object, []CompareType{compareGreater}, "\"%v\" is not greater than \"%v\"", msgAndArgs)
|
||||
}
|
||||
|
||||
// IsNonDecreasing asserts that the collection is not decreasing
|
||||
//
|
||||
// assert.IsNonDecreasing(t, []int{1, 1, 2})
|
||||
// assert.IsNonDecreasing(t, []float{1, 2})
|
||||
// assert.IsNonDecreasing(t, []string{"a", "b"})
|
||||
func IsNonDecreasing(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
|
||||
return isOrdered(t, object, []CompareType{compareLess, compareEqual}, "\"%v\" is not less than or equal to \"%v\"", msgAndArgs)
|
||||
}
|
Reference in New Issue
Block a user