File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ type ConnectorConfig struct {
250250 // that will be used to create connections by the driver.Connector. Use this
251251 // function to set any further advanced configuration options that cannot be set
252252 // with a standard key/value pair in the Params map.
253- Configurator func (config * spanner.ClientConfig , opts * []option.ClientOption )
253+ Configurator func (config * spanner.ClientConfig , opts * []option.ClientOption ) `json:"-"`
254254}
255255
256256func (cc * ConnectorConfig ) String () string {
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import (
1818 "context"
1919 "database/sql"
2020 "database/sql/driver"
21+ "encoding/json"
2122 "fmt"
2223 "net"
2324 "reflect"
@@ -745,6 +746,13 @@ func TestConn_CheckNamedValue(t *testing.T) {
745746 }
746747}
747748
749+ func TestConnectorConfigJson (t * testing.T ) {
750+ _ , err := json .Marshal (ConnectorConfig {})
751+ if err != nil {
752+ t .Fatalf ("failed to marshal ConnectorConfig: %v" , err )
753+ }
754+ }
755+
748756// ValuerPerson implements driver.Valuer
749757type ValuerPerson struct {
750758 Name string
You can’t perform that action at this time.
0 commit comments