go-mssqldb: Compilation error

Describe the bug Hi there, Your module requires github.com/golang-sql/sqlexp This module had no go.mod file until now, and one was added today (https://github.com/golang-sql/sqlexp/blob/master/go.mod) for go 1.16. After running go get -u ./... on my module (which requires yours) I saw:

$ go get -u ./...
go: upgraded github.com/golang-sql/sqlexp v0.0.0-20170517235910-f1bb20e5a188 => v0.0.0-20220518152126-d42ba59f5c11
...

Trying to build my module, I get the following compilation error:

# github.com/denisenkom/go-mssqldb
../../../../pkg/mod/github.com/denisenkom/go-mssqldb@v0.12.0/token.go:790:79: cannot use info.Message (variable of type string) as type fmt.Stringer in struct literal:
	string does not implement fmt.Stringer (missing String method)

Compilation finished with exit code 2

To Reproduce See above. Expected behavior Code that compiles. Thank you!

Further technical details

Operating system: Ubuntu 20.04.4 Golang version: go1.18.2 linux/amd64

Additional context N/A

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 8
  • Comments: 16 (3 by maintainers)

Most upvoted comments

You’re correct. That PR was broken. I committed a working version.

On Thu, May 19, 2022 at 11:03 AM Abdul Rabbani @.***> wrote:

@kardianos https://github.com/kardianos - I am still noticing the error with v0.12.1 and go version: 1.18.2:

Error: @.***/token.go:790:79: cannot use info.Message (variable of type Message) as type string in struct literal

— Reply to this email directly, view it on GitHub https://github.com/denisenkom/go-mssqldb/issues/745#issuecomment-1131908208, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFYLMLWQGMLMMFMUB2HP3LVKZQ4BANCNFSM5WJR5XJA . You are receiving this because you were mentioned.Message ID: @.***>

Added a PR to fix this: https://github.com/denisenkom/go-mssqldb/pull/746. Can anyone from the maintainers team approve/merge this please?

Now tagged. v0.12.1