write golang function like visualfoxpro