In Python z = x or y
can be understood as assign z
as if x is falsey, then y, else x, is there a similar idiom in golang?
Specifically the two variables on the right are strings, I'd like to assign the first if it's non-emtpy, otherwise the second.
No, you have to use if/else:
s1, s2 := "", "hello"
var x string
if s1 == "" {
x = s2
} else {
x = s1
}