开发者交流平台
开发者交流平台

通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。

bj
登录
  • 友情链接
站内
generics

generics

go

空白标识符在类型参数中的目的是什么?

英文: What's the purpose of a blank identifier in a type parameter? 问题 这两个函数有什么区别? func f[_ string...
huangapple 2022年4月15日144评论generics go
go

如何在Go中实现一个通用的Either类型?

英文: How to implement a generic Either type in Go? 问题 在Go 1.18中引入的新泛型特性,我认为可以创建一个'Either[A,B]'类型,用于表示...
huangapple 2022年4月10日175评论generics go
go

泛型:对返回自身的函数类型进行约束。

英文: generics: constraint to a type with a function returning itself 问题 是否可以编写一个通用类型约束,使得该类型包含返回相同类型的...
huangapple 2022年4月9日146评论generics go
go

无法将类型为*T的变量用作参数中的类型。

英文: Cannot use variable of type *T as type in argument 问题 我正在学习Go 1.18的泛型,并且我试图理解为什么我在这里遇到了问题。简而言之,我...
huangapple 2022年4月8日135评论generics go
go

当在具有结构体键的映射上使用maps.Copy时,会出现go 1.18通用编译错误。

英文: go 1.18 generic compile error when use maps.Copy on map with struct key 问题 我实现了一个基于泛型的集合(Set),一切...
huangapple 2022年4月7日147评论generics go
go

Go:为一组单独的结果实现ManyDecode

英文: Go: Implementing a ManyDecode for a "set" of individual results 问题 我已经实现了一个非常简单的解码方法(暂...
huangapple 2022年4月6日158评论go slice
go

Check if any variable conforms any interface using generics in Go

英文: Check if any variable conforms any interface using generics in Go 问题 我正在使用go-fiber编写一个API,并且我想检查...
huangapple 2022年4月3日149评论generics go
go

How does one allow a generic type that is convertible to a pointer to parameterise another generic type that is convertible to a pointer?

英文: How does one allow a generic type that is convertible to a pointer to parameterise another gener...
huangapple 2022年4月1日154评论generics go
go

声明一个带有返回值错误的函数参数。

英文: Declare a function parameter with returning value error 问题 我正在编写一个可以包装任何方法的指标方法。类似于: func DoAndM...
huangapple 2022年4月1日147评论generics go
go

Go 1.18 迁移问题 — 无法将 ‘nil’ 转换为类型 ‘any’

英文: Go 1.18 migration issues — Cannot convert 'nil' to type 'any' 问题 我将您的代码库更新到了Go 1...
huangapple 2022年3月30日325评论generics go
63

文章导航

1 … 27 28 29 30 31 32 33 34 35 … 63
name
开发者交流平台
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
文章117266 留言 4 访客17141147

热门标签

c# android python spring-boot go r java html c++ reactjs css pandas json javascript arrays sql flutter node.js spring typescript

悟已往之不谏,知来者之可追!

今日
00%
已00小时
本周
00%
已过00天
本月
00%
已过00天
今年
00%
已是00月

Copyright ©  开发者交流平台 版权所有.

闽 ICP 备 2022019110 号 - 1
  • 开发者交流平台

    本页二维码