adjust project directory structure to be more friendly to use (#10)

This commit is contained in:
Changjun Ji 2020-05-21 14:58:40 +08:00 committed by GitHub
parent c2391c5b18
commit c0659d8421
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 19 additions and 15 deletions

View File

@ -21,7 +21,6 @@ jobs:
uses: actions/checkout@v2
- name: Go build
run: |
cd cmd/goc
go build
- name: Go build test binary
run: |
@ -32,7 +31,7 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: goc
path: cmd/goc/goc
path: goc
- name: Upload binary result for job 1
uses: actions/upload-artifact@v2
with:

5
.gitignore vendored
View File

@ -2,4 +2,7 @@
.vscode
# ignore log file
**/goc.log
**/goc.log
# binary
goc

View File

@ -1,13 +1,12 @@
# goc
![](https://github.com/qiniu/goc/workflows/ut-check/badge.svg)
![](https://github.com/qiniu/goc/workflows/style-check/badge.svg)
![](https://github.com/qiniu/goc/workflows/e2e%20test/badge.svg)
# goc
A Comprehensive Coverage Testing System for The Go Programming Language
> **Note:**
>
> This readme and related documentation are Work in Progress.
## Installation
```go get github.com/qiniu/goc/cmd/goc```
```go get github.com/qiniu/goc```

View File

@ -14,7 +14,7 @@
limitations under the License.
*/
package app
package cmd
import (
"flag"

View File

@ -14,7 +14,7 @@
limitations under the License.
*/
package app
package cmd
import (
"fmt"

View File

@ -14,7 +14,7 @@
limitations under the License.
*/
package app
package cmd
import (
"fmt"

View File

@ -14,7 +14,7 @@
limitations under the License.
*/
package app
package cmd
import (
"log"
@ -24,7 +24,7 @@ import (
var rootCmd = &cobra.Command{
Use: "goc",
Short: "goc is the comprehensive coverage testing tool for go language",
Short: "goc is a comprehensive coverage testing tool for go language",
}
// Execute the goc tool

View File

@ -14,7 +14,7 @@
limitations under the License.
*/
package app
package cmd
import (
"github.com/qiniu/goc/pkg/cover"
@ -23,7 +23,7 @@ import (
var serverCmd = &cobra.Command{
Use: "server",
Short: "start a server to host all services",
Short: "Start a server to host all services",
Run: func(cmd *cobra.Command, args []string) {
cover.StartServer(port)
},

3
go.sum
View File

@ -431,6 +431,7 @@ github.com/json-iterator/go v0.0.0-20180612202835-f2b4162afba3/go.mod h1:+SdeFBv
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.9 h1:9yzud/Ht36ygwatGx56VwCZtlI/2AD15T1X2sjSuGns=
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
@ -496,9 +497,11 @@ github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh
github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A=
github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180320133207-05fbef0ca5da/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=

View File

@ -16,8 +16,8 @@
package main
import "github.com/qiniu/goc/cmd/goc/app"
import "github.com/qiniu/goc/cmd"
func main() {
app.Execute()
cmd.Execute()
}