forked from mirror/gorm
Add issue, pull request template
This commit is contained in:
parent
5b509264e1
commit
848d68aa04
|
@ -0,0 +1,54 @@
|
|||
Before posting a bug report about a problem, please try to verify that it is a bug and that it has not been reported already.
|
||||
|
||||
Also please apply corresponding GitHub labels to the issue, for feature requests, please apply `type:feature`.
|
||||
|
||||
For usage questions, please ask in https://gitter.im/jinzhu/gorm or http://stackoverflow.com/questions/tagged/go-gorm
|
||||
|
||||
Please answer these questions before submitting your issue. Thanks!
|
||||
|
||||
### What version of Go are you using (`go version`)?
|
||||
|
||||
|
||||
### Which database and its version are you using?
|
||||
|
||||
|
||||
### What did you do?
|
||||
|
||||
Please provide a complete runnable program to reproduce your issue.
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
"github.com/jinzhu/gorm"
|
||||
_ "github.com/jinzhu/gorm/dialects/mssql"
|
||||
_ "github.com/jinzhu/gorm/dialects/mysql"
|
||||
_ "github.com/jinzhu/gorm/dialects/postgres"
|
||||
_ "github.com/jinzhu/gorm/dialects/sqlite"
|
||||
)
|
||||
|
||||
var db *gorm.DB
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
db, err = gorm.Open("sqlite3", "test.db")
|
||||
// Please use below username, password as your database's account for the script.
|
||||
// db, err = gorm.Open("postgres", "user=gorm dbname=gorm sslmode=disable")
|
||||
// db, err = gorm.Open("mysql", "gorm:gorm@/dbname?charset=utf8&parseTime=True")
|
||||
// db, err = gorm.Open("mssql", "sqlserver://gorm:LoremIpsum86@localhost:1433?database=gorm")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
db.LogMode(true)
|
||||
}
|
||||
|
||||
func main() {
|
||||
// your code here
|
||||
|
||||
if /* failure condition */ {
|
||||
fmt.Println("failed")
|
||||
} else {
|
||||
fmt.Println("success")
|
||||
}
|
||||
}
|
||||
```
|
|
@ -0,0 +1,11 @@
|
|||
Make sure these boxes checked before submitting your pull request.
|
||||
|
||||
- [] Do only one thing
|
||||
- [] No API-breaking changes
|
||||
- [] New code/logic commented & tested
|
||||
- [] Write good commit message, try to squash your commits into a single one
|
||||
- [] Run `./build.sh` in `gh-pages` branch for document changes
|
||||
|
||||
For significant changes like big bug fixes, new features, please open an issue to make a agreement on an implementation design/plan first before starting it.
|
||||
|
||||
Thank you.
|
|
@ -1,52 +0,0 @@
|
|||
# How to Contribute
|
||||
|
||||
## Bug Report
|
||||
|
||||
- Do a search on GitHub under Issues in case it has already been reported
|
||||
- Submit __executable script__ or failing test pull request that could demonstrates the issue is *MUST HAVE*
|
||||
|
||||
## Feature Request
|
||||
|
||||
- Feature request with pull request is welcome
|
||||
- Or it won't be implemented until I (other developers) find it is helpful for my (their) daily work
|
||||
|
||||
## Pull Request
|
||||
|
||||
- Prefer single commit pull request, that make the git history can be a bit easier to follow.
|
||||
- New features need to be covered with tests to make sure your code works as expected, and won't be broken by others in future
|
||||
|
||||
## Contributing to Documentation
|
||||
|
||||
- You are welcome ;)
|
||||
- You can help improve the README by making them more coherent, consistent or readable, and add more godoc documents to make people easier to follow.
|
||||
- Blogs & Usage Guides & PPT also welcome, please add them to https://github.com/jinzhu/gorm/wiki/Guides
|
||||
|
||||
### Executable script template
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/jinzhu/gorm"
|
||||
_ "github.com/lib/pq"
|
||||
_ "github.com/mattn/go-sqlite3"
|
||||
)
|
||||
|
||||
var db *gorm.DB
|
||||
|
||||
func init() {
|
||||
var err error
|
||||
db, err = gorm.Open("sqlite3", "test.db")
|
||||
// db, err = gorm.Open("postgres", "user=username dbname=password sslmode=disable")
|
||||
// db, err = gorm.Open("mysql", "user:password@/dbname?charset=utf8&parseTime=True")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
db.LogMode(true)
|
||||
}
|
||||
|
||||
func main() {
|
||||
// Your code
|
||||
}
|
||||
```
|
Loading…
Reference in New Issue