Skip to content

Commit

Permalink
export function
Browse files Browse the repository at this point in the history
Signed-off-by: MUzairS15 <[email protected]>
  • Loading branch information
MUzairS15 committed Mar 11, 2024
1 parent 38f3996 commit 3289f21
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ func Contains[G []K, K comparable](slice G, ele K) bool {

func Cast[K any](val interface{}) (K, error) {
var assertedValue K
if isInterfaceNil(val) {
if IsInterfaceNil(val) {
return assertedValue, ErrTypeCast(fmt.Errorf("nil interface cannot be type casted"))
}
var ok bool
Expand Down

0 comments on commit 3289f21

Please sign in to comment.