File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -875,9 +875,10 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
875
875
876
876
// _loc
877
877
if val := params .Get ("_loc" ); val != "" {
878
- if val == "auto" {
878
+ switch strings .ToLower (val ) {
879
+ case "auto" :
879
880
loc = time .Local
880
- } else {
881
+ default :
881
882
loc , err = time .LoadLocation (val )
882
883
if err != nil {
883
884
return nil , fmt .Errorf ("Invalid _loc: %v: %v" , val , err )
@@ -887,7 +888,7 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
887
888
888
889
// _mutex
889
890
if val := params .Get ("_mutex" ); val != "" {
890
- switch val {
891
+ switch strings . ToLower ( val ) {
891
892
case "no" :
892
893
mutex = C .SQLITE_OPEN_NOMUTEX
893
894
case "full" :
@@ -899,7 +900,7 @@ func (d *SQLiteDriver) Open(dsn string) (driver.Conn, error) {
899
900
900
901
// _txlock
901
902
if val := params .Get ("_txlock" ); val != "" {
902
- switch val {
903
+ switch strings . ToLower ( val ) {
903
904
case "immediate" :
904
905
txlock = "BEGIN IMMEDIATE"
905
906
case "exclusive" :
You can’t perform that action at this time.
0 commit comments