Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ChinaArJun committed Apr 9, 2024
1 parent ce6f0a8 commit 091e524
Show file tree
Hide file tree
Showing 15 changed files with 197 additions and 385 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/aliyunoss

This file was deleted.

70 changes: 0 additions & 70 deletions .github/workflows/build&pushServer

This file was deleted.

3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ build/
script/release.go
conf.yaml
main
oktools*
oktools*
tpl/index.html
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 maomao1996

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
76 changes: 42 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,59 @@
# devTools - golang程序员利器
> 工具的初衷,最大化减少重复性劳动

## 效果预览
> json转golang struct
[English](./README.md) | [中文](./README_zh.md)

# devTools - golang programmer's tool
> The original intention of the tool is to minimize repetitive work
## Effect preview
> json to golang struct
![img](./asset/json.png)
> mysql转golang struct
> mysql to golang struct
![img](./asset/mysql.png)


## 有哪些功能?
``` go
r.GET("/base64", contoller.Base64, middleware.UsageCount)
r.GET("/image2base64", contoller.Image2Base64, middleware.UsageCount)
r.GET("/tinyimg", contoller.TinyImage, middleware.UsageCount)
r.GET("/hash", contoller.Hash, middleware.UsageCount)
r.GET("/file-hash", contoller.FileHash, middleware.UsageCount)
r.GET("/ip", contoller.IPInfo, middleware.UsageCount)
r.GET("/json", contoller.JSONView, middleware.UsageCount)
r.GET("/number", contoller.Number, middleware.UsageCount)
r.GET("/placeholder", contoller.Placeholder, middleware.UsageCount)
r.GET("/qrcode", contoller.QRCode, middleware.UsageCount)
r.GET("/regex", contoller.Regex, middleware.UsageCount)
r.GET("/timestamp", contoller.Timestamp, middleware.UsageCount)
r.GET("/color", contoller.Color, middleware.UsageCount)
r.GET("/aes", contoller.AES, middleware.UsageCount)
r.GET("/des", contoller.DES, middleware.UsageCount)
r.GET("/rsa", contoller.RSA, middleware.UsageCount)
r.GET("/morse", contoller.Morse, middleware.UsageCount)
r.GET("/url", contoller.URL, middleware.UsageCount)
r.GET("/unicode", contoller.Unicode, middleware.UsageCount)
r.GET("/json2go", contoller.JSON2GO, middleware.UsageCount)
r.GET("/json2xml", contoller.JSON2XML, middleware.UsageCount)
r.GET("/json2yaml", contoller.JSON2YAML, middleware.UsageCount)
r.GET("/pdf2img", contoller.PDF2IMG, middleware.UsageCount)
## What functions are there?
``` go
r.GET("/base64", contoller.Base64, middleware.UsageCount)
r.GET("/image2base64", contoller.Image2Base64, middleware.UsageCount)
r.GET("/tinyimg", contoller.TinyImage, middleware.UsageCount)
r.GET("/hash", contoller.Hash, middleware.UsageCount)
r.GET("/file-hash", contoller.FileHash, middleware.UsageCount)
r.GET("/ip", contoller.IPInfo, middleware.UsageCount)
r.GET("/json", contoller.JSONView, middleware.UsageCount)
r.GET("/number", contoller.Number, middleware.UsageCount)
r.GET("/placeholder", contoller.Placeholder, middleware.UsageCount)
r.GET("/qrcode", contoller.QRCode, middleware.UsageCount)
r.GET("/regex", contoller.Regex, middleware.UsageCount)
r.GET("/timestamp", contoller.Timestamp, middleware.UsageCount)
r.GET("/color", contoller.Color, middleware.UsageCount)
r.GET("/aes", controller.AES, middleware.UsageCount)
r.GET("/des", controller.DES, middleware.UsageCount)
r.GET("/rsa", contoller.RSA, middleware.UsageCount)
r.GET("/morse", contoller.Morse, middleware.UsageCount)
r.GET("/url", contoller.URL, middleware.UsageCount)
r.GET("/unicode", contoller.Unicode, middleware.UsageCount)
r.GET("/json2go", contoller.JSON2GO, middleware.UsageCount)
r.GET("/json2xml", contoller.JSON2XML, middleware.UsageCount)
r.GET("/json2yaml", contoller.JSON2YAML, middleware.UsageCount)
r.GET("/pdf2img", contoller.PDF2IMG, middleware.UsageCount)
```

## 打包
## Pack
> go build main.go
> command-line-arguments
> .\main.go:57:7: undefined: InitRouter

> Windows下编译Mac, Linux平台的64位可执行程序:
> Compile 64-bit executable programs for Mac and Linux platforms under Windows:
* $ SET CGO_ENABLED=0 SET GOOS=darwin3 SET GOARCH=amd64 go build main.go
* $ SET CGO_ENABLED=0 SET GOOS=linux SET GOARCH=amd64 go build main.go
* $ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./src/main.go
* $ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./src/main.go

## 参考
## refer to
* [tools](https://github.com/wangyiwy/oktools)
* [mysql](https://github.com)


## License

[MIT](https://github.com/chinaarjun/devTools/blob/LICENSE)
51 changes: 51 additions & 0 deletions README_zh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# devTools - golang程序员利器
> 工具的初衷,最大化减少重复性劳动
## 效果预览
> json转golang struct
![img](./asset/json.png)
> mysql转golang struct
![img](./asset/mysql.png)


## 有哪些功能?
``` go
r.GET("/base64", contoller.Base64, middleware.UsageCount)
r.GET("/image2base64", contoller.Image2Base64, middleware.UsageCount)
r.GET("/tinyimg", contoller.TinyImage, middleware.UsageCount)
r.GET("/hash", contoller.Hash, middleware.UsageCount)
r.GET("/file-hash", contoller.FileHash, middleware.UsageCount)
r.GET("/ip", contoller.IPInfo, middleware.UsageCount)
r.GET("/json", contoller.JSONView, middleware.UsageCount)
r.GET("/number", contoller.Number, middleware.UsageCount)
r.GET("/placeholder", contoller.Placeholder, middleware.UsageCount)
r.GET("/qrcode", contoller.QRCode, middleware.UsageCount)
r.GET("/regex", contoller.Regex, middleware.UsageCount)
r.GET("/timestamp", contoller.Timestamp, middleware.UsageCount)
r.GET("/color", contoller.Color, middleware.UsageCount)
r.GET("/aes", contoller.AES, middleware.UsageCount)
r.GET("/des", contoller.DES, middleware.UsageCount)
r.GET("/rsa", contoller.RSA, middleware.UsageCount)
r.GET("/morse", contoller.Morse, middleware.UsageCount)
r.GET("/url", contoller.URL, middleware.UsageCount)
r.GET("/unicode", contoller.Unicode, middleware.UsageCount)
r.GET("/json2go", contoller.JSON2GO, middleware.UsageCount)
r.GET("/json2xml", contoller.JSON2XML, middleware.UsageCount)
r.GET("/json2yaml", contoller.JSON2YAML, middleware.UsageCount)
r.GET("/pdf2img", contoller.PDF2IMG, middleware.UsageCount)
```

## 打包
> go build main.go
> command-line-arguments
> .\main.go:57:7: undefined: InitRouter

> Windows下编译Mac, Linux平台的64位可执行程序:
* $ SET CGO_ENABLED=0 SET GOOS=darwin3 SET GOARCH=amd64 go build main.go
* $ SET CGO_ENABLED=0 SET GOOS=linux SET GOARCH=amd64 go build main.go
* $ CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ./src/main.go

## 参考
* [tools](https://github.com/wangyiwy/oktools)
* [mysql](https://github.com)
3 changes: 3 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env sh
set -e
go build src/main.go
34 changes: 0 additions & 34 deletions deploy.sh

This file was deleted.

13 changes: 3 additions & 10 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
version: '2.2'
version: "2.2"
services:
oktools:
image: tools:v1.0-master
volumes:
- './oktools/:/app/'
- "./oktools/:/app/"
container_name: oktools
ports:
- '81:81'
# oktools:
# image: oktools:v1.0-master
# volumes:
# - '/data/wwwroot/tools.zhequtao.com/:/home/'
# container_name: oktools
# ports:
# - '81:81'
- "81:81"
Loading

0 comments on commit 091e524

Please sign in to comment.