简单函数的定义,形参可有可无,返回值可有可无
1 package main 2 3 import "fmt" 4 5 func main() { 6 res, res2 := test5() 7 fmt.Println(res + res2) 8 } 9 10 func test5() (string, string) { 11 return "只有永不遏制的奋斗", "才能使青春之花" 12 13 }
posted on 2022-11-03 11:22 默玖 阅读(10) 评论(0) 编辑 收藏 举报
Powered by: 博客园 Copyright © 2024 默玖 Powered by .NET 8.0 on Kubernetes