Monthly Archives: January 2019

go: Legacy character encoding conversion to UTF-8

Go language is using UTF-8 encoding, but sometimes text files are encoded in some other encoding, like Windows-1250. Here is example, how it could be done https://play.golang.org/p/K3JAeM4nCVD Decoding table used in this program was developed from page CP1250.TXT at ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/ … Continue reading

Posted in golang, workday | Leave a comment

go: Enumeration

There is no enumeration in Golang, but here is an example, which could be good start for any project, which needs to utilize enumeration. See https://play.golang.org/p/pD29UI37iq1

Posted in golang, workday | Leave a comment

go: Three dots/ellipses notation and variadic function; arrays vs slices

Go program example below explores arrays, slices and three dots notation. Arrays and slices are similar, arrays have static usage, slices are dynamic. Arrays are type values, fixed length sentences of items of the same type. Slices are reference types. … Continue reading

Posted in golang, workday | Leave a comment