gowok

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Gowok is a library that contains a lot of functions that help you to build Go project.
It has some utilities like:
  • config loader,
  • project bootstrapper,
  • HTTP response builder,
  • nil safety,
  • password hash, and so on.
The Background
Even using framework, build a Golang project still tiring. So many repetitive tasks have to done by developer. The worst, that activities almost same, like:
  • managing database connection(s),
  • bootstrapping HTTP (or anything) server,
  • make utility functions, and so on.
Gowok here to end this nightmare. Don't worry about your work anymore.
The Use Cases
  • REST API Backend Service
    Gowok ships with built-in support for HTTP server through the net/http which you can used to build REST API.
  • Microservice with GRPC
    Gowok also provide microservices communication via GRPC, it possible to works with HTTP in parallel.
  • Event Driven Listener (Worker)
    Gowok has runner and hooks management that can used to setup event listener. Every listeners will registered in bootstrapping process.
The Developer Experience
Gowok aims to be easy to use that can increase developer's productivity. All features are designed to follow official and community coding pattern. Plus, the libraries used are as familiar as possible to many developers. Everything understandable here.
For example, if you ask how to run project using Gowok. The answer would be easy.
Yappp..!! Just load the project then call
Run()
function.
Example:
go
gowok.Run()
That easy, broh!
The Development Status
In this time, Gowok still version 0.x.x. With ongoing development, it will be more stable and ready to use widely.
Although, our team uses Gowok as everyday tool in peaceful work.
Gowok是一个包含大量实用功能的库,可帮助你构建Go项目。
它提供以下实用工具:
  • 配置加载器,
  • 项目引导器,
  • HTTP响应构建器,
  • 空值安全处理,
  • 密码哈希 等等。

Core

开发背景

TopicDescriptionReference
Getting Startedstarting new projectgetting-started
Configurationconfiguration structure, reading config values starting new projectconfiguration
Runnermanage how to run the projectrunner
Singletonobject container, global long-lived object managementsingleton
WebHTTP server, routerweb
即便使用框架,构建Golang项目仍然十分繁琐。开发者需要完成大量重复性工作,更糟的是,这些工作内容几乎千篇一律,比如:
  • 管理数据库连接,
  • 启动HTTP(或其他类型)服务器,
  • 编写工具函数 等等。
Gowok正是为终结这种困境而生。从此无需再为这些重复工作发愁。

Features

使用场景

TopicDescriptionReference
Some (Nil Safety)wrapping nilable value for safety accesssome
SQLconnect to multiple SQL servers with different connection typessql
  • REST API后端服务
    Gowok通过net/http内置了HTTP服务器支持,你可以用它来构建REST API。
  • 基于GRPC的微服务
    Gowok还支持通过GRPC实现微服务通信,并且可以与HTTP服务并行运行。
  • 事件驱动监听器(Worker)
    Gowok具备运行器和钩子管理功能,可用于设置事件监听器。所有监听器都会在项目引导过程中完成注册。

开发者体验

Gowok的设计目标是易于使用,以提升开发者的生产力。所有功能均遵循官方及社区的编码规范。此外,所使用的库都是众多开发者所熟悉的,一切都通俗易懂。
比如,如果你问如何使用Gowok运行项目,答案非常简单。
哇哦!只需加载项目然后调用
Run()
函数即可。
示例:
go
gowok.Run()
就这么简单!

开发状态

目前,Gowok仍处于0.x.x版本。随着开发的持续推进,它将变得更加稳定并适合广泛使用。
不过,我们团队已经在日常工作中平稳使用Gowok了。

核心模块

主题描述参考文档
入门指南创建新项目getting-started
配置配置结构、读取配置值及创建新项目configuration
运行器管理项目运行方式runner
单例对象容器、全局长生命周期对象管理singleton
Web模块HTTP服务器、路由web

功能特性

主题描述参考文档
空值安全处理包装可空值以实现安全访问some
SQL模块连接多种不同类型的SQL服务器sql