Global stocks sank Wednesday after US President Donald Trump said he was not satisfied with talks that are aimed at averting a trade war with China. Equities were also dented by poor eurozone economic data, and as Trump cast doubt on a planned summit with North Korean leader Kim Jong Un. “Trump (is) continuing to drive uncertainty over global trade,” said analyst Joshua Mahony at trading firm IG. “European markets are following their Asian counterparts lower, as a pessimistic tone from Trump is compounded by downbeat economic data,” he added. Markets had surged Monday after US Treasury Secretary Steven Mnuchin and Chinese Vice Premier Liu He said they had agreed to pull back from imposing threatened tariffs on billions of dollars of goods, and continue talks on a variety of trade issues. However, Trump has declared that he was “not satisfied” with the status of the talks, fuelling worries that the world’s top two economies could still slug out an economically pain...
Go by Example: Hello World
Our first program will print the classic “hello world” message. Here’s the full source code.
| package main
|
import "fmt"
| |
func main() {
fmt.Println("hello world")
}
|
To run the program, put the code in
hello-world.go and use go run . | $ go run hello-world.go
hello world
|
Sometimes we’ll want to build our programs into binaries. We can do this using
go build . | $ go build hello-world.go
$ ls
hello-world hello-world.go
|
We can then execute the built binary directly.
| $ ./hello-world
hello world
|
Now that we can run and build basic Go programs, let’s learn more about the language.
|
Comments
Post a Comment