Skip to content

Use internal logger package, add go.mod, build script and docs#8

Open
gwind wants to merge 2 commits intomasterfrom
codex/upgrade-dependencies-and-compile-multi-platform
Open

Use internal logger package, add go.mod, build script and docs#8
gwind wants to merge 2 commits intomasterfrom
codex/upgrade-dependencies-and-compile-multi-platform

Conversation

@gwind
Copy link
Copy Markdown
Contributor

@gwind gwind commented Apr 23, 2026

Motivation

  • Remove the external github.com/sirupsen/logrus dependency by providing a lightweight internal logger that matches the existing call sites.
  • Introduce module metadata and developer-facing build/docs to simplify local development and multi-platform builds.

Description

  • Replaced imports of github.com/sirupsen/logrus with an internal alias logrus "github.com/ooclab/es/logger" across examples, tests, link, session, tunnel and proto packages.
  • Added a new logger package implementing the minimal logging API used by the codebase including SetLevel, Debug/Debugf, Infof, Warn/Warnf, Error/Errorf, Fatalln, and WithField/WithFields with an Entry type.
  • Added go.mod with module github.com/ooclab/es and go 1.25.0 to enable module mode.
  • Added scripts/build_multi_platform.sh to build for multiple OS/ARCH targets and a Chinese-language developer guide docs/zh_CN/Go环境与多平台编译指南.md.

Testing

  • Ran unit tests with go test ./... which completed successfully.
  • Built all packages locally across targets with ./scripts/build_multi_platform.sh which completed without errors.
  • Static checks (basic build) were validated by running go build ./... and succeeded.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant