> Why can't it be a single line of code in Go?

Because Golang has (to my knowledge) no support of any syntax that supports that.

You are a bit hard to discuss with, but I want to show good will, so I'll try to explain and hope you can appreciate that! :-)

Golang (just like most, but not all!) languages has one default way of doing things. Which is: execute each line (or statement / expression) sequentially.

That's why you can write `loadMissiles(); fireMissles()` and it works.

But it could be different. Imagine a language where each of those is, by default, executed in parallel. There are academic languages that actually work like that.

How would you then do something sequentually? By rewriting your code:
`var result = loadMissiles(); fireMissles(result)`. This is a semantical enforcement of sequential execution.

Now let's change this a little bit and add a `.then()` method onto every value (even `null` if the language has that). Then we rewrite the code:

`loadMissiles().then(result -> fireMissles(result))`.

Looks familiar? If we add builtin error-handling then we just have re-invented javascript promises and this is not a coincidence.

Now, there is a duality to that - executing code independent of each other, so non-sequential. (whether it is actually run in parallel or not does not matter, as long as the outcome is the same, minus performance implications of course).

How would one do that? By adding a new method, let's call it `all()` that accepts a list of expressions. Unlike methods like .fold or .reduce, there is no way for the elements inside the list of expressions to interact with each other. That means even in a language that is "sequential by default" these expressions can (or could) be executed in parallel without a problem. This is basically Promise.all() in javascript.

Two more final steps.

First step: we have now invented promises (including sequential and non-sequential execution) which describe asynchronous computations. But how about other things? Let's think of results. They are similar - sometimes we need a successful result to continue (sequential) sometimes we can execute logic non-sequential. How about optionality? Well, it's basically like a result where the error has no information, so same thing. How about parsers? Sometimes we can need to parse something and then we decide how to keep parsing based on the result (sequential) - sometimes we can parse multiple things non-sequential. What about resources? Sometimes we need a database connection to open a network connection (sequential). Sometimes we can do both non-sequential.

And so on. See the pattern? Let's call those things "contexts" and then allow developers to define those contexts themselves, because we certainly can't foresee all contexts that exist in the world. Certain things are necessary to allow to do that, including some kind of parametrism (like generics).

Second step:

Now that we have those contexts, we can use them. But it would be nice to write code in the same way as "normal context" code (whatever that means for our language). So we should have some syntax to help with context switches - optimally for both sequentual and non-sequential logic. And optimally generalized and not specialized to single contexts.

Different languages have different strategies for the second step. Golang doesn't have anything like that (well, to my knowledge, I'm not a golang dev). It certainly doesn't have a generalized version though, that is for sure.

Therefore to come back to:

> Why can't it be a single line of code in Go?

The answer is, because it lacks the syntax in the second step and - to my knowledge - the way to define contexts (at least typesafe ones, my unsafe ones are possible) and in particular the syntax to deal with them (without having to call .then() or - worse - if/else).