go get github.com/godror/godror
Then install Oracle Client libraries (see below) and you’re ready to go!
Note that Windows may need some newer gcc (mingw-w64 with gcc 7.2.0).
Although Oracle Client libraries are NOT required for compiling, they are needed at run time.
To install and configure the Oracle client libraries, follow the general ODPI-C
Where those instructions mention the optional use of
instead in godror (on Windows and macOS) you can use the optional
parameter to indicate the Oracle Client library directory:
db, err := sql.Open("godror", `user="scott" password="tiger" connectString="dbhost:1521/orclpdb1" libDir="/Users/myname/instantclient_19_3"`)