Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
hiifong committed Jul 25, 2023
1 parent 84d3f5a commit 3f6bd1e
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 8 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: golangci-lint
on:
push:
branches:
- dev
pull_request:

permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read

jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.20'
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Require: The version of golangci-lint to use.
# When `install-mode` is `binary` (default) the value can be v1.2 or v1.2.3 or `latest` to use the latest version.
# When `install-mode` is `goinstall` the value can be v1.2.3, `latest`, or the hash of a commit.
version: latest
args: --verbose

# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true
Empty file removed .github/workflows/main.yml
Empty file.
38 changes: 38 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
linters:
enable-all: false
disable-all: true
fast: false
enable:
- bodyclose
- dogsled
- dupl
- errcheck
- exportloopref
- exhaustive
- gochecknoinits
- goconst
- gocritic
- gocyclo
- gofmt
- goimports
- goprintffuncname
- gosec
- gosimple
- govet
- ineffassign
- lll
- misspell
- nakedret
- noctx
- nolintlint
- staticcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- whitespace
- gofumpt

run:
timeout: 3m
1 change: 1 addition & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion TikTok.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package main

import (
"hiif.ong/TikTok/cmd"
"log"
"os"

"biu-x.org/TikTok/cmd"
)

const version = "v0.1"
Expand Down
2 changes: 1 addition & 1 deletion apk
Submodule apk updated from 32c488 to e85c59
8 changes: 4 additions & 4 deletions cmd/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import (
"github.com/urfave/cli/v2"
)

// CmdApi api 子命令
var CmdApi = &cli.Command{
// CmdAPI api 子命令
var CmdAPI = &cli.Command{
Name: "api",
Usage: "Start TikTok api server",
Description: `Star TikTok api server`,
Action: runApi,
Action: runAPI,
Flags: []cli.Flag{
&cli.StringFlag{
Name: "port",
Expand All @@ -20,6 +20,6 @@ var CmdApi = &cli.Command{
},
}

func runApi(ctx *cli.Context) error {
func runAPI(ctx *cli.Context) error {
return nil
}
2 changes: 1 addition & 1 deletion cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ func NewApp() *cli.App {

// 子命令集
subCmdWithConfig := []*cli.Command{
CmdApi,
CmdAPI,
}

app.Commands = append(app.Commands, subCmdWithConfig...)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module hiif.ong/TikTok
module biu-x.org/TikTok

go 1.20

Expand Down
4 changes: 4 additions & 0 deletions modules/config/config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package config

func InitConfig() {
}

0 comments on commit 3f6bd1e

Please sign in to comment.