Skip to content

Commit

Permalink
replace gomod with github.com/jixiuf/swag.
Browse files Browse the repository at this point in the history
  • Loading branch information
jixiufeng authored and jixiufeng committed Mar 22, 2023
1 parent 1060461 commit da56890
Show file tree
Hide file tree
Showing 94 changed files with 189 additions and 185 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ GOPATH:=$(shell $(GOCMD) env GOPATH)
u := $(if $(update),-u)

BINARY_NAME:=swag
PACKAGES:=$(shell $(GOLIST) github.com/swaggo/swag github.com/swaggo/swag/cmd/swag github.com/swaggo/swag/gen github.com/swaggo/swag/format)
PACKAGES:=$(shell $(GOLIST) github.com/jixiuf/swag github.com/jixiuf/swag/cmd/swag github.com/jixiuf/swag/gen github.com/jixiuf/swag/format)
GOFILES:=$(shell find . -name "*.go" -type f)

export GO111MODULE := on
Expand Down
2 changes: 1 addition & 1 deletion PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
e.g. add cool parser.

**Relation issue**
e.g. https://github.com/swaggo/swag/pull/118/files
e.g. https://github.com/jixiuf/swag/pull/118/files

**Additional context**
Add any other context about the problem here.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

<img align="right" width="180px" src="https://raw.githubusercontent.com/swaggo/swag/master/assets/swaggo.png">

[![Build Status](https://github.com/swaggo/swag/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/features/actions)
[![Build Status](https://github.com/jixiuf/swag/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/features/actions)
[![Coverage Status](https://img.shields.io/codecov/c/github/swaggo/swag/master.svg)](https://codecov.io/gh/swaggo/swag)
[![Go Report Card](https://goreportcard.com/badge/github.com/swaggo/swag)](https://goreportcard.com/report/github.com/swaggo/swag)
[![Go Report Card](https://goreportcard.com/badge/github.com/jixiuf/swag)](https://goreportcard.com/report/github.com/jixiuf/swag)
[![codebeat badge](https://codebeat.co/badges/71e2f5e5-9e6b-405d-baf9-7cc8b5037330)](https://codebeat.co/projects/github-com-swaggo-swag-master)
[![Go Doc](https://godoc.org/github.com/swaggo/swagg?status.svg)](https://godoc.org/github.com/swaggo/swag)
[![Go Doc](https://godoc.org/github.com/jixiuf/swagg?status.svg)](https://godoc.org/github.com/jixiuf/swag)
[![Backers on Open Collective](https://opencollective.com/swag/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/swag/sponsors/badge.svg)](#sponsors) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fswaggo%2Fswag.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fswaggo%2Fswag?ref=badge_shield)
[![Release](https://img.shields.io/github/release/swaggo/swag.svg?style=flat-square)](https://github.com/swaggo/swag/releases)
[![Release](https://img.shields.io/github/release/swaggo/swag.svg?style=flat-square)](https://github.com/jixiuf/swag/releases)


Swag converts Go annotations to Swagger Documentation 2.0. We've created a variety of plugins for popular [Go web frameworks](#supported-web-frameworks). This allows you to quickly integrate with an existing Go project (using Swagger UI).
Expand Down Expand Up @@ -56,7 +56,7 @@ go install github.com/swaggo/swag/cmd/swag@latest
```
To build from source you need [Go](https://golang.org/dl/) (1.16 or newer).

Or download a pre-compiled binary from the [release page](https://github.com/swaggo/swag/releases).
Or download a pre-compiled binary from the [release page](https://github.com/jixiuf/swag/releases).

3. Run `swag init` in the project's root folder which contains the `main.go` file. This will parse your comments and generate the required files (`docs` folder and `docs/docs.go`).
```sh
Expand Down Expand Up @@ -139,7 +139,7 @@ OPTIONS:
## How to use it with Gin
Find the example source code [here](https://github.com/swaggo/swag/tree/master/example/celler).
Find the example source code [here](https://github.com/jixiuf/swag/tree/master/example/celler).
1. After using `swag init` to generate Swagger 2.0 docs, import the following packages:
```go
Expand Down Expand Up @@ -242,8 +242,8 @@ import (
"strconv"
"github.com/gin-gonic/gin"
"github.com/swaggo/swag/example/celler/httputil"
"github.com/swaggo/swag/example/celler/model"
"github.com/jixiuf/swag/example/celler/httputil"
"github.com/jixiuf/swag/example/celler/model"
)
// ShowAccount godoc
Expand Down Expand Up @@ -308,7 +308,7 @@ swag init
## The swag formatter
The Swag Comments can be automatically formatted, just like 'go fmt'.
Find the result of formatting [here](https://github.com/swaggo/swag/tree/master/example/celler).
Find the result of formatting [here](https://github.com/jixiuf/swag/tree/master/example/celler).
Usage:
```shell
Expand Down Expand Up @@ -367,7 +367,7 @@ func (c *Controller) ListAccounts(ctx *gin.Context) {
## General API Info
**Example**
[celler/main.go](https://github.com/swaggo/swag/blob/master/example/celler/main.go)
[celler/main.go](https://github.com/jixiuf/swag/blob/master/example/celler/main.go)
| annotation | description | example |
|-------------|--------------------------------------------|---------------------------------|
Expand Down Expand Up @@ -410,7 +410,7 @@ When a short string in your documentation is insufficient, or you need images, c
## API Operation
**Example**
[celler/controller](https://github.com/swaggo/swag/tree/master/example/celler/controller)
[celler/controller](https://github.com/jixiuf/swag/tree/master/example/celler/controller)
| annotation | description |
Expand Down Expand Up @@ -693,7 +693,7 @@ type Account struct {
}
```
[#708](https://github.com/swaggo/swag/issues/708) The parser handles only struct comments starting with `@Description` attribute.
[#708](https://github.com/jixiuf/swag/issues/708) The parser handles only struct comments starting with `@Description` attribute.
But it writes all struct field comments as is.
So, generated swagger doc as follows:
Expand All @@ -715,7 +715,7 @@ So, generated swagger doc as follows:
```
### Use swaggertype tag to supported custom type
[#201](https://github.com/swaggo/swag/issues/201#issuecomment-475479409)
[#201](https://github.com/jixiuf/swag/issues/201#issuecomment-475479409)
```go
type TimestampTime struct {
Expand Down Expand Up @@ -751,7 +751,7 @@ type Account struct {
}
```
[#379](https://github.com/swaggo/swag/issues/379)
[#379](https://github.com/jixiuf/swag/issues/379)
```go
type CerticateKeyPair struct {
Crt []byte `json:"crt" swaggertype:"string" format:"base64" example:"U3dhZ2dlciByb2Nrcw=="`
Expand Down Expand Up @@ -913,7 +913,7 @@ This project was inspired by [yvasiyarov/swagger](https://github.com/yvasiyarov/
## Contributors
This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/swaggo/swag/graphs/contributors"><img src="https://opencollective.com/swag/contributors.svg?width=890&button=false" /></a>
<a href="https://github.com/jixiuf/swag/graphs/contributors"><img src="https://opencollective.com/swag/contributors.svg?width=890&button=false" /></a>
## Backers
Expand Down
24 changes: 12 additions & 12 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@

[![Travis Status](https://img.shields.io/travis/swaggo/swag/master.svg)](https://travis-ci.org/swaggo/swag)
[![Coverage Status](https://img.shields.io/codecov/c/github/swaggo/swag/master.svg)](https://codecov.io/gh/swaggo/swag)
[![Go Report Card](https://goreportcard.com/badge/github.com/swaggo/swag)](https://goreportcard.com/report/github.com/swaggo/swag)
[![Go Report Card](https://goreportcard.com/badge/github.com/jixiuf/swag)](https://goreportcard.com/report/github.com/jixiuf/swag)
[![codebeat badge](https://codebeat.co/badges/71e2f5e5-9e6b-405d-baf9-7cc8b5037330)](https://codebeat.co/projects/github-com-swaggo-swag-master)
[![Go Doc](https://godoc.org/github.com/swaggo/swagg?status.svg)](https://godoc.org/github.com/swaggo/swag)
[![Go Doc](https://godoc.org/github.com/jixiuf/swagg?status.svg)](https://godoc.org/github.com/jixiuf/swag)
[![Backers on Open Collective](https://opencollective.com/swag/backers/badge.svg)](#backers)
[![Sponsors on Open Collective](https://opencollective.com/swag/sponsors/badge.svg)](#sponsors) [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fswaggo%2Fswag.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fswaggo%2Fswag?ref=badge_shield)
[![Release](https://img.shields.io/github/release/swaggo/swag.svg?style=flat-square)](https://github.com/swaggo/swag/releases)
[![Release](https://img.shields.io/github/release/swaggo/swag.svg?style=flat-square)](https://github.com/jixiuf/swag/releases)

Swag将Go的注释转换为Swagger2.0文档。我们为流行的 [Go Web Framework](#支持的Web框架) 创建了各种插件,这样可以与现有Go项目快速集成(使用Swagger UI)。

Expand Down Expand Up @@ -130,7 +130,7 @@ OPTIONS:

## 如何与Gin集成

[点击此处](https://github.com/swaggo/swag/tree/master/example/celler)查看示例源代码。
[点击此处](https://github.com/jixiuf/swag/tree/master/example/celler)查看示例源代码。

1. 使用`swag init`生成Swagger2.0文档后,导入如下代码包:

Expand Down Expand Up @@ -234,8 +234,8 @@ import (
"strconv"

"github.com/gin-gonic/gin"
"github.com/swaggo/swag/example/celler/httputil"
"github.com/swaggo/swag/example/celler/model"
"github.com/jixiuf/swag/example/celler/httputil"
"github.com/jixiuf/swag/example/celler/model"
)

// ShowAccount godoc
Expand Down Expand Up @@ -300,7 +300,7 @@ swag init
## 格式化说明

可以针对Swag的注释自动格式化,就像`go fmt`
此处查看格式化结果 [here](https://github.com/swaggo/swag/tree/master/example/celler).
此处查看格式化结果 [here](https://github.com/jixiuf/swag/tree/master/example/celler).

示例:
```shell
Expand Down Expand Up @@ -336,7 +336,7 @@ swag fmt -d ./ --exclude ./internal

## 通用API信息

**示例** [`celler/main.go`](https://github.com/swaggo/swag/blob/master/example/celler/main.go)
**示例** [`celler/main.go`](https://github.com/jixiuf/swag/blob/master/example/celler/main.go)

| 注释 | 说明 | 示例 |
| ----------------------- | ----------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
Expand Down Expand Up @@ -377,7 +377,7 @@ swag fmt -d ./ --exclude ./internal

## API操作

Example [celler/controller](https://github.com/swaggo/swag/tree/master/example/celler/controller)
Example [celler/controller](https://github.com/jixiuf/swag/tree/master/example/celler/controller)

| 注释 | 描述 |
| -------------------- | ------------------------------------------------------------------------------------------------------- |
Expand Down Expand Up @@ -600,7 +600,7 @@ type Account struct {

### 使用`swaggertype`标签更改字段类型

[#201](https://github.com/swaggo/swag/issues/201#issuecomment-475479409)
[#201](https://github.com/jixiuf/swag/issues/201#issuecomment-475479409)

```go
type TimestampTime struct {
Expand Down Expand Up @@ -637,7 +637,7 @@ type Account struct {
}
```

[#379](https://github.com/swaggo/swag/issues/379)
[#379](https://github.com/jixiuf/swag/issues/379)

```go
type CerticateKeyPair struct {
Expand Down Expand Up @@ -741,7 +741,7 @@ This project was inspired by [yvasiyarov/swagger](https://github.com/yvasiyarov/
## 贡献者

This project exists thanks to all the people who contribute. [[Contribute](CONTRIBUTING.md)].
<a href="https://github.com/swaggo/swag/graphs/contributors"><img src="https://opencollective.com/swag/contributors.svg?width=890&button=false" /></a>
<a href="https://github.com/jixiuf/swag/graphs/contributors"><img src="https://opencollective.com/swag/contributors.svg?width=890&button=false" /></a>

## 支持者

Expand Down
6 changes: 3 additions & 3 deletions cmd/swag/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (

"github.com/urfave/cli/v2"

"github.com/swaggo/swag"
"github.com/swaggo/swag/format"
"github.com/swaggo/swag/gen"
"github.com/jixiuf/swag"
"github.com/jixiuf/swag/format"
"github.com/jixiuf/swag/gen"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions doc.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Package swag converts Go annotations to Swagger Documentation 2.0.
See https://github.com/swaggo/swag for more information about swag.
See https://github.com/jixiuf/swag for more information about swag.
*/
package swag // import "github.com/swaggo/swag"
package swag // import "github.com/jixiuf/swag"
2 changes: 1 addition & 1 deletion example/basic/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"encoding/json"
"net/http"

"github.com/swaggo/swag/example/basic/web"
"github.com/jixiuf/swag/example/basic/web"
)

// GetStringByInt example
Expand Down
2 changes: 1 addition & 1 deletion example/basic/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by swaggo/swag
package docs

import "github.com/swaggo/swag"
import "github.com/jixiuf/swag"

const docTemplate = `{
"schemes": {{ marshal .Schemes }},
Expand Down
2 changes: 1 addition & 1 deletion example/basic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package main
import (
"net/http"

"github.com/swaggo/swag/example/basic/api"
"github.com/jixiuf/swag/example/basic/api"
)

// @title Swagger Example API
Expand Down
2 changes: 1 addition & 1 deletion example/celler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Gen doc

```console
$ go get -u github.com/swaggo/swag/cmd/swag
$ go get -u github.com/jixiuf/swag/cmd/swag
$ swag init
```

Expand Down
4 changes: 2 additions & 2 deletions example/celler/controller/accounts.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"strconv"

"github.com/gin-gonic/gin"
"github.com/swaggo/swag/example/celler/httputil"
"github.com/swaggo/swag/example/celler/model"
"github.com/jixiuf/swag/example/celler/httputil"
"github.com/jixiuf/swag/example/celler/model"
)

// ShowAccount godoc
Expand Down
4 changes: 2 additions & 2 deletions example/celler/controller/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/swaggo/swag/example/celler/httputil"
"github.com/swaggo/swag/example/celler/model"
"github.com/jixiuf/swag/example/celler/httputil"
"github.com/jixiuf/swag/example/celler/model"
)

// Auth godoc
Expand Down
4 changes: 2 additions & 2 deletions example/celler/controller/bottles.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (

"github.com/gin-gonic/gin"

"github.com/swaggo/swag/example/celler/httputil"
"github.com/swaggo/swag/example/celler/model"
"github.com/jixiuf/swag/example/celler/httputil"
"github.com/jixiuf/swag/example/celler/model"
)

// ShowBottle godoc
Expand Down
2 changes: 1 addition & 1 deletion example/celler/controller/examples.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"

"github.com/gin-gonic/gin"
"github.com/swaggo/swag/example/celler/httputil"
"github.com/jixiuf/swag/example/celler/httputil"
)

// PingExample godoc
Expand Down
2 changes: 1 addition & 1 deletion example/celler/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by swaggo/swag
package docs

import "github.com/swaggo/swag"
import "github.com/jixiuf/swag"

const docTemplate = `{
"schemes": {{ marshal .Schemes }},
Expand Down
4 changes: 2 additions & 2 deletions example/celler/go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/swaggo/swag/example/celler
module github.com/jixiuf/swag/example/celler

go 1.17

Expand All @@ -7,7 +7,7 @@ require (
github.com/gofrs/uuid v4.2.0+incompatible
github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2
github.com/swaggo/gin-swagger v1.4.2
github.com/swaggo/swag v1.8.1
github.com/jixiuf/swag v1.8.1
)

require (
Expand Down
6 changes: 3 additions & 3 deletions example/celler/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2 h1:+iNTcqQJy0OZ5jk6a5
github.com/swaggo/files v0.0.0-20210815190702-a29dd2bc99b2/go.mod h1:lKJPbtWzJ9JhsTN1k1gZgleJWY/cqq0psdoMmaThG3w=
github.com/swaggo/gin-swagger v1.4.2 h1:qDs1YrBOTnurDG/JVMc8678KhoS1B1okQGPtIqVz4YU=
github.com/swaggo/gin-swagger v1.4.2/go.mod h1:hmJ1vPn+XjUvnbzjCdUAxVqgraxELxk8x5zAsjCE5mg=
github.com/swaggo/swag v1.7.9/go.mod h1:gZ+TJ2w/Ve1RwQsA2IRoSOTidHz6DX+PIG8GWvbnoLU=
github.com/swaggo/swag v1.8.1 h1:JuARzFX1Z1njbCGz+ZytBR15TFJwF2Q7fu8puJHhQYI=
github.com/swaggo/swag v1.8.1/go.mod h1:ugemnJsPZm/kRwFUnzBlbHRd0JY9zE1M4F+uy2pAaPQ=
github.com/jixiuf/swag v1.7.9/go.mod h1:gZ+TJ2w/Ve1RwQsA2IRoSOTidHz6DX+PIG8GWvbnoLU=
github.com/jixiuf/swag v1.8.1 h1:JuARzFX1Z1njbCGz+ZytBR15TFJwF2Q7fu8puJHhQYI=
github.com/jixiuf/swag v1.8.1/go.mod h1:ugemnJsPZm/kRwFUnzBlbHRd0JY9zE1M4F+uy2pAaPQ=
github.com/ugorji/go v1.1.7 h1:/68gy2h+1mWMrwZFeD1kQialdSzAb432dtpeJ42ovdo=
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
github.com/ugorji/go/codec v1.1.7 h1:2SvQaVZ1ouYrrKKwoSk2pzd4A9evlKJb9oTL+OaLUSs=
Expand Down
6 changes: 3 additions & 3 deletions example/celler/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"net/http"

"github.com/gin-gonic/gin"
"github.com/swaggo/swag/example/celler/controller"
_ "github.com/swaggo/swag/example/celler/docs"
"github.com/swaggo/swag/example/celler/httputil"
"github.com/jixiuf/swag/example/celler/controller"
_ "github.com/jixiuf/swag/example/celler/docs"
"github.com/jixiuf/swag/example/celler/httputil"

swaggerFiles "github.com/swaggo/files"
ginSwagger "github.com/swaggo/gin-swagger"
Expand Down
2 changes: 1 addition & 1 deletion example/go-module-support/docs/docs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// This file was generated by swaggo/swag
package docs

import "github.com/swaggo/swag"
import "github.com/jixiuf/swag"

const docTemplate = `{
"schemes": {{ marshal .Schemes }},
Expand Down
4 changes: 2 additions & 2 deletions example/go-module-support/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/swaggo/swag/example/go-module-support
module github.com/jixiuf/swag/example/go-module-support

go 1.17

require (
github.com/gin-gonic/gin v1.7.7
github.com/swaggo/examples v0.0.0-20190624100559-f57286ab550c
github.com/swaggo/swag v1.8.1
github.com/jixiuf/swag v1.8.1
)

require (
Expand Down

0 comments on commit da56890

Please sign in to comment.