Refactor to use conndata as menustorageservice conn arg

This commit is contained in:
lash
2025-01-04 20:36:18 +00:00
parent f61e65f4fe
commit 450dfa02cc
12 changed files with 98 additions and 125 deletions

View File

@@ -12,16 +12,16 @@ const (
DBTYPE_POSTGRES
)
type connData struct {
type ConnData struct {
typ int
str string
}
func (cd *connData) DbType() int {
func (cd *ConnData) DbType() int {
return cd.typ
}
func (cd *connData) String() string {
func (cd *ConnData) String() string {
return cd.str
}
@@ -44,8 +44,8 @@ func probeGdbm(s string) (string, bool) {
return s, true
}
func toConnData(connStr string) (connData, error) {
var o connData
func ToConnData(connStr string) (ConnData, error) {
var o ConnData
if connStr == "" {
return o, nil