...

Source file src/go.mongodb.org/mongo-driver/internal/assert/assertion_compare_legacy.go

Documentation: go.mongodb.org/mongo-driver/internal/assert

     1  // Copied from https://github.com/stretchr/testify/blob/1333b5d3bda8cf5aedcf3e1aaa95cac28aaab892/assert/assertion_compare_legacy.go
     2  
     3  // Copyright 2020 Mat Ryer, Tyler Bunnell and all contributors. All rights reserved.
     4  // Use of this source code is governed by an MIT-style license that can be found in
     5  // the THIRD-PARTY-NOTICES file.
     6  
     7  //go:build !go1.17
     8  // +build !go1.17
     9  
    10  package assert
    11  
    12  import "reflect"
    13  
    14  // Older versions of Go does not have the reflect.Value.CanConvert
    15  // method.
    16  func canConvert(value reflect.Value, to reflect.Type) bool {
    17  	return false
    18  }
    19  

View as plain text