Implementation of bsearch in go.