fix example code to adhere to godoc style