Golang 默认的CGO参数编译导致的GLIBC错误

问题描述 使用go正常编译了Linux下的程序,放到服务器上报错 ./app: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by ./app) 解决 Google了下,发现相同的Issue,于是通过go env检查本机golang运行环境,发现CGO默认启用而且程序也不涉及CGO相关的东西,于是设置CGO参数为关闭。然后编译程序 CGO_ENABLED="0" go build -v 重新上传,运行OK.

August 30, 2022 · 1 min · czyt

Golang Expr不完全指南

安装 库的说明 Expr package provides an engine that can compile and evaluate expressions. An expression is a one-liner that returns a value (mostly, but not limited to, booleans). It is designed for simplicity, speed and safety. The purpose of the package is to allow users to use expressions inside configuration for more complex logic. It is a perfect candidate for the foundation of a business rule engine. 安装 go get -u /github....

July 13, 2022 · 9 min · czyt

Golang DSL参考

ANTLR 4 图书 The definitive ANTLR 4 reference (2014) 英文版下载 中文版下载 文章 使用ANTLR和Go实现DSL入门 手把手教你使用ANTLR和Go实现一门DSL语言part1 part2part3part4part5 Parsing with ANTLR 4 and Go 实例代码 bilibili gengine link go-zero link grule-rule-engine Others 图书 Writing A Compiler In Go Writing an Interpreter in Go µGo语言实现——从头开发一个迷你Go语言编译器 文章 Build your own DSL with Go & HCL How to Write Syntax Tree-Based Domain-Specific Languages in Go Handwritten Parsers & Lexers in Go goyacc实战 TiDB SQL Parser 的实现...

July 11, 2022 · 1 min · czyt