Repository: microsoft/go-mssqldb
Pull request #12 (2022-04-25 20:39:21)

Rename the module
This fork will be persistent, so the module name needs to change.
Once the community has submitted a few PRs we will request inclusion on godocs and other sites that promote Golang content.



Patch:
diff --git a/README.md b/README.md
index 596a896..55f11f1 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,14 @@
 # A pure Go MSSQL driver for Go's database/sql package
 
-[![Go Reference](https://pkg.go.dev/badge/github.com/denisenkom/go-mssqldb.svg)](https://pkg.go.dev/github.com/denisenkom/go-mssqldb)
-[![Build status](https://ci.appveyor.com/api/projects/status/jrln8cs62wj9i0a2?svg=true)](https://ci.appveyor.com/project/denisenkom/go-mssqldb)
-[![codecov](https://codecov.io/gh/denisenkom/go-mssqldb/branch/master/graph/badge.svg)](https://codecov.io/gh/denisenkom/go-mssqldb)
+[![Go Reference](https://pkg.go.dev/badge/github.com/microsoft/go-mssqldb.svg)](https://pkg.go.dev/github.com/microsoft/go-mssqldb)
+[![Build status](https://ci.appveyor.com/api/projects/status/jrln8cs62wj9i0a2?svg=true)](https://ci.appveyor.com/project/microsoft/go-mssqldb)
+[![codecov](https://codecov.io/gh/microsoft/go-mssqldb/branch/master/graph/badge.svg)](https://codecov.io/gh/microsoft/go-mssqldb)
 
 ## Install
 
 Requires Go 1.8 or above.
 
-Install with `go get github.com/denisenkom/go-mssqldb` .
+Install with `go get github.com/microsoft/go-mssqldb` .
 
 ## Connection Parameters and DSN
 
@@ -140,7 +140,7 @@ import (
   "net/url"
 
   // Import the Azure AD driver module (also imports the regular driver package)
-  "github.com/denisenkom/go-mssqldb/azuread"
+  "github.com/microsoft/go-mssqldb/azuread"
 )
 
 func ConnectWithMSI() (*sql.DB, error) {
@@ -288,9 +288,9 @@ are supported:
  or add a `select ID = convert(bigint, SCOPE_IDENTITY());` to the end of your
  query (ref [SCOPE_IDENTITY](https://docs.microsoft.com/en-us/sql/t-sql/functions/scope-identity-transact-sql)).
  This will ensure you are getting the correct ID and will prevent a network round trip.
-* [NewConnector](https://godoc.org/github.com/denisenkom/go-mssqldb#NewConnector)
+* [NewConnector](https://godoc.org/github.com/microsoft/go-mssqldb#NewConnector)
     may be used with [OpenDB](https://golang.org/pkg/database/sql/#OpenDB).
-* [Connector.SessionInitSQL](https://godoc.org/github.com/denisenkom/go-mssqldb#Connector.SessionInitSQL)
+* [Connector.SessionInitSQL](https://godoc.org/github.com/microsoft/go-mssqldb#Connector.SessionInitSQL)
  may be set to set any driver specific session settings after the session
  has been reset. If empty the session will still be reset but use the database
  defaults in Go1.10+.
diff --git a/appveyor.yml b/appveyor.yml
index c03f375..2d91ebb 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -3,7 +3,7 @@ version: 1.0.{build}
 image:
   - Visual Studio 2015
 
-clone_folder: c:\gopath\src\github.com\denisenkom\go-mssqldb
+clone_folder: c:\gopath\src\github.com\microsoft\go-mssqldb
 
 environment:
   GOPATH: c:\gopath
diff --git a/azuread/configuration.go b/azuread/configuration.go
index a6e30e9..33e5afd 100644
--- a/azuread/configuration.go
+++ b/azuread/configuration.go
@@ -9,8 +9,8 @@ import (
 	"github.com/Azure/azure-sdk-for-go/sdk/azcore"
 	"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
 	"github.com/Azure/azure-sdk-for-go/sdk/azidentity"
-	mssql "github.com/denisenkom/go-mssqldb"
-	"github.com/denisenkom/go-mssqldb/msdsn"
+	mssql "github.com/microsoft/go-mssqldb"
+	"github.com/microsoft/go-mssqldb/msdsn"
 )
 
 const (
diff --git a/azuread/driver.go b/azuread/driver.go
index fa41757..01d3da4 100644
--- a/azuread/driver.go
+++ b/azuread/driver.go
@@ -5,7 +5,7 @@ import (
 	"database/sql"
 	"database/sql/driver"
 
-	mssql "github.com/denisenkom/go-mssqldb"
+	mssql "github.com/microsoft/go-mssqldb"
 )
 
 // DriverName is the name used to register the driver
diff --git a/bulkcopy.go b/bulkcopy.go
index f6cf97a..dcfccbf 100644
--- a/bulkcopy.go
+++ b/bulkcopy.go
@@ -11,8 +11,8 @@ import (
 	"strings"
 	"time"
 
-	"github.com/denisenkom/go-mssqldb/internal/decimal"
-	"github.com/denisenkom/go-mssqldb/msdsn"
+	"github.com/microsoft/go-mssqldb/internal/decimal"
+	"github.com/microsoft/go-mssqldb/msdsn"
 )
 
 type Bulk struct {
diff --git a/doc/how-to-perform-bulk-imports.md b/doc/how-to-perform-bulk-imports.md
index f8c0a3a..3ac3dcc 100644
--- a/doc/how-to-perform-bulk-imports.md
+++ b/doc/how-to-perform-bulk-imports.md
@@ -5,7 +5,7 @@ To use the bulk imports feature in go-mssqldb, you need to import the sql and go
 ```
 import (
     "database/sql"
-    "github.com/denisenkom/go-mssqldb"
+    "github.com/microsoft/go-mssqldb"
 )
 ```
 
diff --git a/doc/how-to-use-newconnector.md b/doc/how-to-use-newconnector.md
index 0273d89..cd89414 100644
--- a/doc/how-to-use-newconnector.md
+++ b/doc/how-to-use-newconnector.md
@@ -7,7 +7,7 @@ To use the Connector type, first you need to import the sql and go-mssqldb packa
 ```
 import (
   "database/sql"
-  "github.com/denisenkom/go-mssqldb"
+  "github.com/microsoft/go-mssqldb"
 )
 ```
 
diff --git a/examples/azuread-accesstoken/go.mod b/examples/azuread-accesstoken/go.mod
index eb113f3..cee1784 100644
--- a/examples/azuread-accesstoken/go.mod
+++ b/examples/azuread-accesstoken/go.mod
@@ -1,8 +1,8 @@
-module github.com/denisenkom/go-mssqldb/examples/azure-ad-accesstoken
+module github.com/microsoft/go-mssqldb/examples/azure-ad-accesstoken
 
 go 1.13
 
 require (
 	github.com/Azure/go-autorest/autorest/adal v0.8.1
-	github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73
+	github.com/microsoft/go-mssqldb v0.12.0
 )
diff --git a/examples/azuread-accesstoken/go.sum b/examples/azuread-accesstoken/go.sum
index 17148ff..432407e 100644
--- a/examples/azuread-accesstoken/go.sum
+++ b/examples/azuread-accesstoken/go.sum
@@ -14,8 +14,8 @@ github.com/Azure/go-autorest/autorest/mocks v0.3.0/go.mod h1:a8FDP3DYzQ4RYfVAxAN
 github.com/Azure/go-autorest/logger v0.1.0/go.mod h1:oExouG+K6PryycPJfVSxi/koC6LSNgds39diKLz7Vrc=
 github.com/Azure/go-autorest/tracing v0.5.0 h1:TRn4WjSnkcSy5AEG3pnbtFSwNtwzjr4VYyQflFE619k=
 github.com/Azure/go-autorest/tracing v0.5.0/go.mod h1:r/s2XiOKccPW3HrqB+W0TQzfbtp2fGCgRFtBroKn4Dk=
-github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73 h1:OGNva6WhsKst5OZf7eZOklDztV3hwtTHovdrLHV+MsA=
-github.com/denisenkom/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
+github.com/microsoft/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73 h1:OGNva6WhsKst5OZf7eZOklDztV3hwtTHovdrLHV+MsA=
+github.com/microsoft/go-mssqldb v0.0.0-20191128021309-1d7a30a10f73/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM=
 github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
 github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY=
diff --git a/examples/azuread-accesstoken/managed_identity.go b/examples/azuread-accesstoken/managed_identity.go
index 0adf99c..6ff3617 100644
--- a/examples/azuread-accesstoken/managed_identity.go
+++ b/examples/azuread-accesstoken/managed_identity.go
@@ -7,7 +7,7 @@ import (
 	"log"
 
 	"github.com/Azure/go-autorest/autorest/adal"
-	mssql "github.com/denisenkom/go-mssqldb"
+	mssql "github.com/microsoft/go-mssqldb"
 )
 
 var (
diff --git a/examples/bulk/bulk.go b/examples/bulk/bulk.go
index 8ce1238..bcd6e99 100644
--- a/examples/bulk/bulk.go
+++ b/examples/bulk/bulk.go
@@ -6,7 +6,7 @@ import (
 	"fmt"
 	"log"
 
-	"github.com/denisenkom/go-mssqldb"
+	mssql "github.com/microsoft/go-mssqldb"
 )
 
 var (
diff --git a/examples/routine/routine.go b/examples/routine/routine.go
index 3c9cf74..42f6513 100644
--- a/examples/routine/routine.go
+++ b/examples/routine/routine.go
@@ -8,7 +8,7 @@ import (
 	"strconv"
 	"sync"
 
-	_ "github.com/denisenkom/go-mssqldb"
+	_ "github.com/microsoft/go-mssqldb"
 )
 
 var (
diff --git a/examples/simple/simple.go b/examples/simple/simple.go
index 67f88aa..7cb5cfc 100644
--- a/examples/simple/simple.go
+++ b/examples/simple/simple.go
@@ -6,7 +6,7 @@ import (
 	"fmt"
 	"log"
 
-	_ "github.com/denisenkom/go-mssqldb"
+	_ "github.com/microsoft/go-mssqldb"
 )
 
 var (
diff --git a/examples/tsql/tsql.go b/examples/tsql/tsql.go
index f90cf46..69dc8d4 100644
--- a/examples/tsql/tsql.go
+++ b/examples/tsql/tsql.go
@@ -9,7 +9,7 @@ import (
 	"os"
 	"time"
 
-	_ "github.com/denisenkom/go-mssqldb"
+	_ "github.com/microsoft/go-mssqldb"
 )
 
 func main() {
diff --git a/examples/tvp/tvp.go b/examples/tvp/tvp.go
index a07bb65..061b7f3 100644
--- a/examples/tvp/tvp.go
+++ b/examples/tvp/tvp.go
@@ -4,8 +4,9 @@ import (
 	"database/sql"
 	"flag"
 	"fmt"
-	"github.com/denisenkom/go-mssqldb"
 	"log"
+
+	mssql "github.com/microsoft/go-mssqldb"
 )
 
 var (
diff --git a/fedauth.go b/fedauth.go
index cd74cb5..27ff3fc 100644
--- a/fedauth.go
+++ b/fedauth.go
@@ -4,7 +4,7 @@ import (
 	"context"
 	"errors"
 
-	"github.com/denisenkom/go-mssqldb/msdsn"
+	"github.com/microsoft/go-mssqldb/msdsn"
 )
 
 // Federated authentication library affects the login data structure and message sequence.
diff --git a/go.mod b/go.mod
index 792e038..562681d 100644
--- a/go.mod
+++ b/go.mod
@@ -1,4 +1,4 @@
-module github.com/denisenkom/go-mssqldb
+module github.com/microsoft/go-mssqldb
 
 go 1.11
 
diff --git a/log.go b/log.go
index 8d99bd5..8ccb403 100644
--- a/log.go
+++ b/log.go
@@ -3,7 +3,7 @@ package mssql
 import (
 	"context"
 
-	"github.com/denisenkom/go-mssqldb/msdsn"
+	"github.com/microsoft/go-mssqldb/msdsn"
 )
 
 const (
diff --git a/msdsn/conn_str.go b/msdsn/conn_str.go
index 40bedb0..d85f086 100644
--- a/msdsn/conn_str.go
+++ b/msdsn/conn_str.go
@@ -80,7 +80,7 @@ func SetupTLS(certificate string, insecureSkipVerify bool, hostInCertificate str
 		ServerName:         hostInCertificate,
 		InsecureSkipVerify: insecureSkipVerify,
 
-		// fix for https://github.com/denisenkom/go-mssqldb/issues/166
+		// fix for https://github.com/microsoft/go-mssqldb/issues/166
 		// Go implementation of TLS payload size heuristic algorithm splits single TDS package to multiple TCP segments,
 		// while SQL Server seems to expect one TCP segment per encrypted TDS package.
 		// Setting DynamicRecordSizingDisabled to true disables that algorithm and uses 16384 bytes per TLS package
diff --git a/mssql.go b/mssql.go
index d9a5211..68925da 100644
--- a/mssql.go
+++ b/mssql.go
@@ -15,9 +15,9 @@ import (
 	"time"
 	"unicode"
 
-	"github.com/denisenkom/go-mssqldb/internal/querytext"
-	"github.com/denisenkom/go-mssqldb/msdsn"
 	"github.com/golang-sql/sqlexp"
+	"github.com/microsoft/go-mssqldb/internal/querytext"
+	"github.com/microsoft/go-mssqldb/msdsn"
 )
 
 // ReturnStatus may be used to return the return value from a proc.
diff --git a/tds.go b/tds.go
index dbe9527..b6d9bc9 100644
--- a/tds.go
+++ b/tds.go
@@ -16,7 +16,7 @@ import (
 	"unicode/utf16"
 	"unicode/utf8"
 
-	"github.com/denisenkom/go-mssqldb/msdsn"
+	"github.com/microsoft/go-mssqldb/msdsn"
 )
 
 func parseInstances(msg []byte) map[string]map[string]string {
@@ -1142,7 +1142,7 @@ initiate_connection:
 			if config.DynamicRecordSizingDisabled == false {
 				config = config.Clone()
 
-				// fix for https://github.com/denisenkom/go-mssqldb/issues/166
+				// fix for https://github.com/microsoft/go-mssqldb/issues/166
 				// Go implementation of TLS payload size heuristic algorithm splits single TDS package to multiple TCP segments,
 				// while SQL Server seems to expect one TCP segment per encrypted TDS package.
 				// Setting DynamicRecordSizingDisabled to true disables that algorithm and uses 16384 bytes per TLS package
diff --git a/token.go b/token.go
index 80e20c7..738e3ee 100644
--- a/token.go
+++ b/token.go
@@ -9,8 +9,8 @@ import (
 	"io/ioutil"
 	"strconv"
 
-	"github.com/denisenkom/go-mssqldb/msdsn"
 	"github.com/golang-sql/sqlexp"
+	"github.com/microsoft/go-mssqldb/msdsn"
 )
 
 //go:generate go run golang.org/x/tools/cmd/stringer -type token
diff --git a/types.go b/types.go
index 5c0508a..8780341 100644
--- a/types.go
+++ b/types.go
@@ -10,8 +10,8 @@ import (
 	"strconv"
 	"time"
 
-	"github.com/denisenkom/go-mssqldb/internal/cp"
-	"github.com/denisenkom/go-mssqldb/internal/decimal"
+	"github.com/microsoft/go-mssqldb/internal/cp"
+	"github.com/microsoft/go-mssqldb/internal/decimal"
 )
 
 // fixed-length data types


Test patch:
diff --git a/azuread/azuread_test.go b/azuread/azuread_test.go
index ba7de67..e6e16e4 100644
--- a/azuread/azuread_test.go
+++ b/azuread/azuread_test.go
@@ -7,7 +7,7 @@ import (
 	"os"
 	"testing"
 
-	mssql "github.com/denisenkom/go-mssqldb"
+	mssql "github.com/microsoft/go-mssqldb"
 )
 
 func TestAzureSqlAuth(t *testing.T) {
diff --git a/azuread/configuration_test.go b/azuread/configuration_test.go
index c58b8b8..208f652 100644
--- a/azuread/configuration_test.go
+++ b/azuread/configuration_test.go
@@ -3,8 +3,8 @@ package azuread
 import (
 	"testing"
 
-	mssql "github.com/denisenkom/go-mssqldb"
-	"github.com/denisenkom/go-mssqldb/msdsn"
+	mssql "github.com/microsoft/go-mssqldb"
+	"github.com/microsoft/go-mssqldb/msdsn"
 )
 
 func TestValidateParameters(t *testing.T) {
diff --git a/bulkimport_example_test.go b/bulkimport_example_test.go
index 4fafbc9..5046c35 100644
--- a/bulkimport_example_test.go
+++ b/bulkimport_example_test.go
@@ -9,7 +9,7 @@ import (
 	"strings"
 	"unicode/utf8"
 
-	mssql "github.com/denisenkom/go-mssqldb"
+	mssql "github.com/microsoft/go-mssqldb"
 )
 
 const (
diff --git a/datetimeoffset_example_test.go b/datetimeoffset_example_test.go
index ad419c4..8267b6d 100644
--- a/datetimeoffset_example_test.go
+++ b/datetimeoffset_example_test.go
@@ -9,8 +9,8 @@ import (
 	"log"
 	"time"
 
-	mssql "github.com/denisenkom/go-mssqldb"
 	"github.com/golang-sql/civil"
+	mssql "github.com/microsoft/go-mssqldb"
 )
 
 // This example shows how to insert and retrieve date and time types data
diff --git a/log_test.go b/log_test.go
index 9ac86d7..529e283 100644
--- a/log_test.go
+++ b/log_test.go
@@ -8,7 +8,7 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/denisenkom/go-mssqldb/msdsn"
+	"github.com/microsoft/go-mssqldb/msdsn"
 )
 
 // bufLogger implements the Logger interface for testing purposes.
diff --git a/messages_example_test.go b/messages_example_test.go
index 37dc0e8..99faf3f 100644
--- a/messages_example_test.go
+++ b/messages_example_test.go
@@ -9,8 +9,8 @@ import (
 	"fmt"
 	"log"
 
-	mssql "github.com/denisenkom/go-mssqldb"
 	"github.com/golang-sql/sqlexp"
+	mssql "github.com/microsoft/go-mssqldb"
 )
 
 const (
diff --git a/mssql_test.go b/mssql_test.go
index d1bab1b..9c50b83 100644
--- a/mssql_test.go
+++ b/mssql_test.go
@@ -10,7 +10,7 @@ import (
 	"reflect"
 	"testing"
 
-	"github.com/denisenkom/go-mssqldb/msdsn"
+	"github.com/microsoft/go-mssqldb/msdsn"
 )
 
 func TestBadOpen(t *testing.T) {
diff --git a/newconnector_example_test.go b/newconnector_example_test.go
index 8dc74ba..28bfd5a 100644
--- a/newconnector_example_test.go
+++ b/newconnector_example_test.go
@@ -12,7 +12,7 @@ import (
 	"net/url"
 	"strconv"
 
-	mssql "github.com/denisenkom/go-mssqldb"
+	mssql "github.com/microsoft/go-mssqldb"
 )
 
 var (
diff --git a/queries_test.go b/queries_test.go
index 0a22239..864453d 100644
--- a/queries_test.go
+++ b/queries_test.go
@@ -16,7 +16,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/denisenkom/go-mssqldb/msdsn"
+	"github.com/microsoft/go-mssqldb/msdsn"
 )
 
 func driverWithProcess(t *testing.T, tl Logger) *Driver {
diff --git a/tds_login_test.go b/tds_login_test.go
index f7c4cb7..3bb11e5 100644
--- a/tds_login_test.go
+++ b/tds_login_test.go
@@ -11,7 +11,7 @@ import (
 	"sync/atomic"
 	"testing"
 
-	"github.com/denisenkom/go-mssqldb/msdsn"
+	"github.com/microsoft/go-mssqldb/msdsn"
 )
 
 type MockTransportDialer struct {
diff --git a/tds_test.go b/tds_test.go
index 7d9af0d..6d765cd 100644
--- a/tds_test.go
+++ b/tds_test.go
@@ -17,7 +17,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/denisenkom/go-mssqldb/msdsn"
+	"github.com/microsoft/go-mssqldb/msdsn"
 )
 
 type MockTransport struct {
diff --git a/tvp_example_test.go b/tvp_example_test.go
index c27f98e..2f8ede5 100644
--- a/tvp_example_test.go
+++ b/tvp_example_test.go
@@ -8,7 +8,7 @@ import (
 	"fmt"
 	"log"
 
-	mssql "github.com/denisenkom/go-mssqldb"
+	mssql "github.com/microsoft/go-mssqldb"
 )
 
 // This example shows how to use tvp type