Skip to content

Instantly share code, notes, and snippets.

View qi7chen's full-sized avatar
🎯
Focusing

Johnnie qi7chen

🎯
Focusing
  • Ubisoft
  • Chengdu
View GitHub Profile
-- map(table, function)
-- e.g: map({1,2,3}, function(a) return a*2 end) -> {2,4,6}
function map(tbl, func)
local newtbl = {}
for i,v in pairs(tbl) do
newtbl[i] = func(v)
end
return newtbl
end
@qi7chen
qi7chen / go-env-with-msys2.md
Created December 8, 2022 08:56 — forked from glycerine/go-env-with-msys2.md
Go development environment on Windows with MSYS2

Go development environment on Windows with MSYS2

Normally, it is sufficient to grab the Go MSI installer from the website in order to set up the toolchain. However, some packages that provide Go wrappers for C libraries rely on cgo tool, which in turn, needs the GCC toolchain in order to build the glue code. Also, 3rd-party dependencies are usually hosted on services like GitHub, thus Git is also needed. This mini-guide illustrates how to setup a convenient development environment on Windows using MSYS2.