chardet is library to automatically detect charset of texts for Go programming language. It's based on the algorithm and data in ICU's implementation.
See pkgdoc