Update example.go to the latest APIs