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 Feb 2, 2024
1 parent 5daaa3e commit 935bc95
Show file tree
Hide file tree
Showing 91 changed files with 180 additions and 176 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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.
28 changes: 14 additions & 14 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 @@ -150,7 +150,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).
Finish the steps in [Getting started](#getting-started)
1. After using `swag init` to generate Swagger 2.0 docs, import the following packages:
Expand Down Expand Up @@ -254,8 +254,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 @@ -320,7 +320,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 @@ -379,7 +379,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 @@ -422,7 +422,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 @@ -706,7 +706,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 @@ -728,7 +728,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 @@ -764,7 +764,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 @@ -951,7 +951,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 @@ -129,7 +129,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 @@ -233,8 +233,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 @@ -299,7 +299,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 @@ -335,7 +335,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 @@ -376,7 +376,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 @@ -601,7 +601,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 @@ -638,7 +638,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 @@ -742,7 +742,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.18

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/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.18

require (
github.com/gin-gonic/gin v1.9.1
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
2 changes: 1 addition & 1 deletion example/markdown/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/markdown/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module github.com/swaggo/swag/example/markdown
module github.com/jixiuf/swag/example/markdown

go 1.18

require (
github.com/gorilla/mux v1.8.0
github.com/swaggo/http-swagger v1.2.6
github.com/swaggo/swag v1.8.1
github.com/jixiuf/swag v1.8.1
)

require (
Expand Down

0 comments on commit 935bc95

Please sign in to comment.