Skip to content

Commit 2e00b5c

Browse files
egorsmkvarnehormann
authored andcommitted
Fix many urls (#530)
1 parent 90403af commit 2e00b5c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

README.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Go-MySQL-Driver
22

3-
A MySQL-Driver for Go's [database/sql](http://golang.org/pkg/database/sql) package
3+
A MySQL-Driver for Go's [database/sql](https://golang.org/pkg/database/sql/) package
44

55
![Go-MySQL-Driver logo](https://raw.github.com/wiki/go-sql-driver/mysql/gomysql_m.png "Golang Gopher holding the MySQL Dolphin")
66

@@ -26,11 +26,11 @@ A MySQL-Driver for Go's [database/sql](http://golang.org/pkg/database/sql) packa
2626
## Features
2727
* Lightweight and [fast](https://github.com/go-sql-driver/sql-benchmark "golang MySQL-Driver performance")
2828
* Native Go implementation. No C-bindings, just pure Go
29-
* Connections over TCP/IPv4, TCP/IPv6, Unix domain sockets or [custom protocols](http://godoc.org/github.com/go-sql-driver/mysql#DialFunc)
29+
* Connections over TCP/IPv4, TCP/IPv6, Unix domain sockets or [custom protocols](https://godoc.org/github.com/go-sql-driver/mysql#DialFunc)
3030
* Automatic handling of broken connections
3131
* Automatic Connection Pooling *(by database/sql package)*
3232
* Supports queries larger than 16MB
33-
* Full [`sql.RawBytes`](http://golang.org/pkg/database/sql/#RawBytes) support.
33+
* Full [`sql.RawBytes`](https://golang.org/pkg/database/sql/#RawBytes) support.
3434
* Intelligent `LONG DATA` handling in prepared statements
3535
* Secure `LOAD DATA LOCAL INFILE` support with file Whitelisting and `io.Reader` support
3636
* Optional `time.Time` parsing
@@ -43,14 +43,14 @@ A MySQL-Driver for Go's [database/sql](http://golang.org/pkg/database/sql) packa
4343
---------------------------------------
4444

4545
## Installation
46-
Simple install the package to your [$GOPATH](http://code.google.com/p/go-wiki/wiki/GOPATH "GOPATH") with the [go tool](http://golang.org/cmd/go/ "go command") from shell:
46+
Simple install the package to your [$GOPATH](https://github.com/golang/go/wiki/GOPATH "GOPATH") with the [go tool](https://golang.org/cmd/go/ "go command") from shell:
4747
```bash
4848
$ go get github.com/go-sql-driver/mysql
4949
```
50-
Make sure [Git is installed](http://git-scm.com/downloads) on your machine and in your system's `PATH`.
50+
Make sure [Git is installed](https://git-scm.com/downloads) on your machine and in your system's `PATH`.
5151

5252
## Usage
53-
_Go MySQL Driver_ is an implementation of Go's `database/sql/driver` interface. You only need to import the driver and can use the full [`database/sql`](http://golang.org/pkg/database/sql) API then.
53+
_Go MySQL Driver_ is an implementation of Go's `database/sql/driver` interface. You only need to import the driver and can use the full [`database/sql`](https://golang.org/pkg/database/sql/) API then.
5454

5555
Use `mysql` as `driverName` and a valid [DSN](#dsn-data-source-name) as `dataSourceName`:
5656
```go
@@ -95,13 +95,13 @@ Alternatively, [Config.FormatDSN](https://godoc.org/github.com/go-sql-driver/mys
9595
Passwords can consist of any character. Escaping is **not** necessary.
9696

9797
#### Protocol
98-
See [net.Dial](http://golang.org/pkg/net/#Dial) for more information which networks are available.
98+
See [net.Dial](https://golang.org/pkg/net/#Dial) for more information which networks are available.
9999
In general you should use an Unix domain socket if available and TCP otherwise for best performance.
100100

101101
#### Address
102102
For TCP and UDP networks, addresses have the form `host:port`.
103103
If `host` is a literal IPv6 address, it must be enclosed in square brackets.
104-
The functions [net.JoinHostPort](http://golang.org/pkg/net/#JoinHostPort) and [net.SplitHostPort](http://golang.org/pkg/net/#SplitHostPort) manipulate addresses in this form.
104+
The functions [net.JoinHostPort](https://golang.org/pkg/net/#JoinHostPort) and [net.SplitHostPort](https://golang.org/pkg/net/#SplitHostPort) manipulate addresses in this form.
105105

106106
For Unix domain sockets the address is the absolute path to the MySQL-Server-socket, e.g. `/var/run/mysqld/mysqld.sock` or `/tmp/mysql.sock`.
107107

@@ -220,11 +220,11 @@ Valid Values: <escaped name>
220220
Default: UTC
221221
```
222222

223-
Sets the location for time.Time values (when using `parseTime=true`). *"Local"* sets the system's location. See [time.LoadLocation](http://golang.org/pkg/time/#LoadLocation) for details.
223+
Sets the location for time.Time values (when using `parseTime=true`). *"Local"* sets the system's location. See [time.LoadLocation](https://golang.org/pkg/time/#LoadLocation) for details.
224224

225225
Note that this sets the location for time.Time values but does not change MySQL's [time_zone setting](https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html). For that see the [time_zone system variable](#system-variables), which can also be set as a DSN parameter.
226226

227-
Please keep in mind, that param values must be [url.QueryEscape](http://golang.org/pkg/net/url/#QueryEscape)'ed. Alternatively you can manually replace the `/` with `%2F`. For example `US/Pacific` would be `loc=US%2FPacific`.
227+
Please keep in mind, that param values must be [url.QueryEscape](https://golang.org/pkg/net/url/#QueryEscape)'ed. Alternatively you can manually replace the `/` with `%2F`. For example `US/Pacific` would be `loc=US%2FPacific`.
228228

229229
##### `maxAllowedPacket`
230230
```
@@ -297,7 +297,7 @@ Valid Values: true, false, skip-verify, <name>
297297
Default: false
298298
```
299299

300-
`tls=true` enables TLS / SSL encrypted connection to the server. Use `skip-verify` if you want to use a self-signed or invalid certificate (server side). Use a custom value registered with [`mysql.RegisterTLSConfig`](http://godoc.org/github.com/go-sql-driver/mysql#RegisterTLSConfig).
300+
`tls=true` enables TLS / SSL encrypted connection to the server. Use `skip-verify` if you want to use a self-signed or invalid certificate (server side). Use a custom value registered with [`mysql.RegisterTLSConfig`](https://godoc.org/github.com/go-sql-driver/mysql#RegisterTLSConfig).
301301

302302
##### `writeTimeout`
303303

@@ -390,17 +390,17 @@ Files must be whitelisted by registering them with `mysql.RegisterLocalFile(file
390390

391391
To use a `io.Reader` a handler function must be registered with `mysql.RegisterReaderHandler(name, handler)` which returns a `io.Reader` or `io.ReadCloser`. The Reader is available with the filepath `Reader::<name>` then. Choose different names for different handlers and `DeregisterReaderHandler` when you don't need it anymore.
392392

393-
See the [godoc of Go-MySQL-Driver](http://godoc.org/github.com/go-sql-driver/mysql "golang mysql driver documentation") for details.
393+
See the [godoc of Go-MySQL-Driver](https://godoc.org/github.com/go-sql-driver/mysql "golang mysql driver documentation") for details.
394394

395395

396396
### `time.Time` support
397397
The default internal output type of MySQL `DATE` and `DATETIME` values is `[]byte` which allows you to scan the value into a `[]byte`, `string` or `sql.RawBytes` variable in your programm.
398398

399-
However, many want to scan MySQL `DATE` and `DATETIME` values into `time.Time` variables, which is the logical opposite in Go to `DATE` and `DATETIME` in MySQL. You can do that by changing the internal output type from `[]byte` to `time.Time` with the DSN parameter `parseTime=true`. You can set the default [`time.Time` location](http://golang.org/pkg/time/#Location) with the `loc` DSN parameter.
399+
However, many want to scan MySQL `DATE` and `DATETIME` values into `time.Time` variables, which is the logical opposite in Go to `DATE` and `DATETIME` in MySQL. You can do that by changing the internal output type from `[]byte` to `time.Time` with the DSN parameter `parseTime=true`. You can set the default [`time.Time` location](https://golang.org/pkg/time/#Location) with the `loc` DSN parameter.
400400

401401
**Caution:** As of Go 1.1, this makes `time.Time` the only variable type you can scan `DATE` and `DATETIME` values into. This breaks for example [`sql.RawBytes` support](https://github.com/go-sql-driver/mysql/wiki/Examples#rawbytes).
402402

403-
Alternatively you can use the [`NullTime`](http://godoc.org/github.com/go-sql-driver/mysql#NullTime) type as the scan destination, which works with both `time.Time` and `string` / `[]byte`.
403+
Alternatively you can use the [`NullTime`](https://godoc.org/github.com/go-sql-driver/mysql#NullTime) type as the scan destination, which works with both `time.Time` and `string` / `[]byte`.
404404

405405

406406
### Unicode support
@@ -435,7 +435,7 @@ That means:
435435
* When distributing, you **must publish** the source code of any **changed files** licensed under the MPL 2.0 under a) the MPL 2.0 itself or b) a compatible license (e.g. GPL 3.0 or Apache License 2.0)
436436
* You **needn't publish** the source code of your library as long as the files licensed under the MPL 2.0 are **unchanged**
437437

438-
Please read the [MPL 2.0 FAQ](http://www.mozilla.org/MPL/2.0/FAQ.html) if you have further questions regarding the license.
438+
Please read the [MPL 2.0 FAQ](https://www.mozilla.org/en-US/MPL/2.0/FAQ/) if you have further questions regarding the license.
439439

440440
You can read the full terms here: [LICENSE](https://raw.github.com/go-sql-driver/mysql/master/LICENSE)
441441

0 commit comments

Comments
 (0)