Ex18.1 in golang