golang - search, sort, pattern matching