Custom Search

SUBSCRIBE

SUBSCRIBE : 300 + Free Video Tutorials Programming (Python, golang, Julia), DevOps

Wednesday, May 17, 2017

Golang Go no new variables on left side of :=


$vim test.go

package main

import "fmt"

func main() {
    //var age int = 42
    //age := 42
    var age int
    age := 42
    fmt.Printf("%#v\n", age)
}




OutPut:
======

$go run test.go
# command-line-arguments
./test.go:8: no new variables on left side of :=
$

No comments:

Post a Comment