码迷,mamicode.com
首页 > 其他好文 > 详细

go functions

时间:2018-06-27 18:58:46      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:sub   fun   block   lock   int   first   turn   return   function   

return type

func add(x int, y int) int { return x + y }
func sub(x, y int) (z int) { z = x - y; return z}
func first(x int, _ int) int { return x }
func zero(int ,int) int { return 0 }

go functions

标签:sub   fun   block   lock   int   first   turn   return   function   

原文地址:https://www.cnblogs.com/person3/p/9235365.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!