fn

package
v0.0.0-...-385762f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 1, 2021 License: GPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cal

func Cal(a int, b int) (res int, err error)
  go的函数定义
	多返回值
	方法名称大写为公开且小写为私有
	如果函数声明返回值的名称,则会将其名称进行对应类型的初始化操作,比如下面的res初始化为0,err为nil

func Cal2

func Cal2(a int, b int) (int, error)

上面可以等价下面

func Contents

func Contents(filename string) (string, error)
Defer:
	1.在函数返回之前会调用defer,类似java中的finally
	2.

Contents returns the file's contents as a string.

func UseDefer

func UseDefer() error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL