当前位置:网站首页>Go basic anonymous variable
Go basic anonymous variable
2022-07-02 23:14:00 【Yi Yue Wang Chao】
go Anonymous variables are often used in ,go What are anonymous variables in , What's the usage? ?
Code :
package main import "fmt" func GetData() (int, int) { return 100, 200 } func main(){ a, _ := GetData() _, b := GetData() //c := GetData() // Report errors :assignment mismatch: 1 variable but GetData returns 2 values fmt.Println(a, b) }
Running results :
边栏推荐
猜你喜欢
[Solved] Splunk: Cannot get username when all users are selected“
实现BottomNavigationView和Navigation联动
泛型与反射,看这篇就够了
AES高级加密协议的动机阐述
golang入门:for...range修改切片中元素的值的另类方法
Start from the bottom structure to learn the customization and testing of FPGA --- Xilinx ROM IP
Eight bit responder [51 single chip microcomputer]
Jinglianwen technology's low price strategy helps AI enterprises reduce model training costs
数据标注典型案例,景联文科技如何助力企业搭建数据方案
阿里云有奖体验:如何使用 PolarDB-X
随机推荐
Splunk audit setting
Start from the bottom structure to learn the customization and testing of FPGA --- Xilinx ROM IP
剑指 Offer II 099. 最小路径之和-双百代码
SQL进阶语法
购买完域名之后能干什么事儿?
情感对话识别与生成简述
移动端 1px 像素兼容性问题,实现1px 边框
Simple square wave generating circuit [51 single chip microcomputer and 8253a]
Detailed explanation and application of merging and sorting
Application of containerization technology in embedded field
Strictly abide by the construction period and ensure the quality, this AI data annotation company has done it!
golang入门:for...range修改切片中元素的值的另类方法
Brief introduction of emotional dialogue recognition and generation
LC173. 二叉搜索树迭代器
Chow-Liu Tree
The motivation of AES Advanced Encryption Protocol
[Yangcheng cup 2020] easyphp
Submit code process
Potplayer set minimized shortcut keys
Alibaba cloud award winning experience: how to use polardb-x