GitXplorerGitXplorer
A

go-toolkit

public
8 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
e971729bac420fff07bfdddcefc6aa555fcc9abd

Could print all wechat mp posts

AAlphaHinex committed 17 days ago
Unverified
2fe5f23a0da2824803e8ff253c8b32eb68211f66

Start v2.3.1, retry 3 times when uploading to mdnice

AAlphaHinex committed 10 months ago
Unverified
cc1912123317c974553741ff463186e4d263dc43

Handle gitlab 500 exception when get commit diff

AAlphaHinex committed a year ago
Unverified
7eae3c7a94caf620f22f9bbbb0f7f3fa26109a9a

Add random pick function

AAlphaHinex committed a year ago
Unverified
f7abfe518f81eab69ea1e01a9a4686d471e235ba

Release v2.3.0

AAlphaHinex committed a year ago
Verified
a9652956021ebd0c5c066c39911f79dd4232ed30

Add Sonar projects overall status exporter toolkit (#6)

AAlphaHinex committed a year ago

README

The README file for this repository.

README

Base on https://cli.urfave.org/

How to build

Enter each folder to execute build command:

$ cd random-pick
# 编译为可在当前环境运行的可执行文件
$ go build
# 编译为可在其他环境运行的可执行文件
$ GOOS=windows GOARCH=amd64 go build
$ GOOS=linux GOARCH=amd64 go build
# -o 可设置编译出的可执行文件名称
$ GOOS=windows GOARCH=amd64 go build -o test_win_amd64.exe

更多可用的 GOOS 和 GOARCH 组合可参照 https://golang.google.cn/doc/install/source#environment

Template

package main

import (
	"fmt"
	"log"
	"os"

	"github.com/urfave/cli/v2"
)

func main() {
	app := &cli.App{
		Name:    "sonar-exp",
		Usage:   "Export sonar projects info into csv",
		Version: "v2.3.1",
		Flags: []cli.Flag{
			&cli.StringFlag{
				Name:     "host",
				Usage:    "Sonar host",
				Required: true,
			},
			&cli.StringFlag{
				Name:     "token",
				Aliases:  []string{"t"},
				Usage:    "User token",
				Required: true,
			},
		},
		Action: func(cCtx *cli.Context) error {
			host := cCtx.String("host")
			token := cCtx.String("token")
			fmt.Printf("boom! I say! %s, %s", host, token)
			return nil
		},
	}

	if err := app.Run(os.Args); err != nil {
		log.Fatal(err)
	}
}