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

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

bj
登录
  • 友情链接
站内
generics

generics

go

Go泛型:无效的复合字面量

英文: Go generics: Invalid composite literal 问题 以下是代码的翻译结果: package main import "fmt" func mai...
huangapple 2023年1月8日148评论generics go
go

你可以编写一个函数,接受两个返回结构体的函数,并同时运行它们。

英文: How can I write a function which accept 2 functions (which return structs) and runs them concurr...
huangapple 2023年1月5日139评论concurrency go
go

How to use an interface containing type constraint as generic

英文: How to use an interface containing type constraint as generic 问题 我想要一个带有泛型的结构体切片。这个泛型是一个带有类型约束的接...
huangapple 2022年12月31日144评论generics go
go

How to define generic function with custom structs without listing all of them?

英文: How to define generic function with custom structs without listing all of them? 问题 假设我有两个不同的结构体:...
huangapple 2022年12月21日142评论generics go
go

如何在Golang中使用包模块的常用函数?

英文: How to common function of package model in golang? 问题 你可以尝试使用接口来解决这个问题。首先,定义一个接口,该接口包含ReadData函数...
huangapple 2022年12月18日153评论generics go
go

Is there a way to elide type of a composite literal by inferring types based on the type parameter of function in go?

英文: Is there a way to elide type of a composite literal by inferring types based on the type paramet...
huangapple 2022年12月18日153评论generics go
go

获取没有类型参数的泛型结构体的类型名称

英文: Get the type name of a generic struct without type parameters 问题 假设我有一个名为foo的通用结构体,并从中创建了两个对象。我可...
huangapple 2022年12月18日154评论generics go
go

访问传递给可变参数函数的泛型结构体的特定字段

英文: Accessing specific field of a generic struct passed to a variadic function 问题 假设我有一个名为foo的通用结构体:...
huangapple 2022年12月17日145评论generics go
go

在Go 1.20中如何在编译时确保严格的可比性?

英文: Ensure strict comparability at compile time in Go 1.20? 问题 在Go 1.18和Go 1.19中,我可以在编译时确保类型是严格可比较的,...
huangapple 2022年12月15日138评论generics go
go

设置不同结构体用作映射值的通用函数

英文: Generic function to set field of different structs used as map values 问题 具有共同字段的结构体... type Defi...
huangapple 2022年12月12日146评论generics go
63

文章导航

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

热门标签

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

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

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

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

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

    本页二维码