dsn 
A data source name adapter for sql.Open in golang.
Usage
name, dsn, _ := dsn.FromRailsConfig("myapp/config/database.yml", "production")
fmt.Printf("[%s] %s", name, dsn)
// => [mysql] username:password@tcp(localhost:3306)/dbname
Features
- Data Source Name from Rails database.yml.
- Support MySQL, PostgreSql, Sqlite.
Installation
$ go get github.com/monochromegane/dsn
TODO
- Data Source Name from flags.
- Data Source Name from Env.
Contribution
- Fork it
- Create a feature branch
- Commit your changes
- Rebase your local changes against the master branch
- Run test suite with the
go test ./... command and confirm that it passes
- Run
gofmt -s
- Create new Pull Request
License
MIT
Author
monochromegane