package utils
import (
"database/sql/driver"
"encoding/json"
)
//go:generate counterfeiter . Some
type Some interface {
Getter() (driver.Value, error)
}
type some struct{}
func (s some) Getter() (driver.Value, error) {
h := map[string]string{}
return json.Marshal(h)
}
The error is:
utils/a.go:17:9: cannot use json.Marshal(h) (value of type []byte) as driver.Value value in return statement
utils/a.go:8: running "counterfeiter": exit status 1
The type driver.Value is ultimately just interface{}.
This used to work. An Concourse issue is caused by this issue.
I abstract the problem with the following code:
The error is:
The type
driver.Value
is ultimately justinterface{}
.This used to work. An Concourse issue is caused by this issue.
Any idea?