In this article we will learn about some of the frequently asked GO programming questions in technical like “go naked return” Code Answer. When creating scripts and web applications, error handling is an important part. If your code lacks error checking code, your program may look very unprofessional and you may be open to security risks. Error or stack handling on go was simple and easy. An error message with filename, line number and a message describing the error is sent to the browser. This tutorial contains some of the most common error checking methods in GO. Below are some solution about “go naked return” Code Answer.
go naked return
xxxxxxxxxx
1
package main
2
3
import "fmt"
4
5
func split(sum int) (x, y int) {
6
x = sum * 4 / 9
7
y = sum - x
8
return
9
}
10
11
func main() {
12
fmt.Println(split(17))
13
}
14