From ed069956471b57d408ecfe2b415eb9dcf08e6c53 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 5 Apr 2025 21:23:00 +0800 Subject: Export symbols from database.go --- database.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'database.go') diff --git a/database.go b/database.go index eafad33..a627f2d 100644 --- a/database.go +++ b/database.go @@ -15,10 +15,10 @@ import ( // at a single point. A failure to do so may cause things as serious as // privilege escalation. -// queryNameDesc is a helper function that executes a query and returns a +// QueryNameDesc is a helper function that executes a query and returns a // list of nameDesc results. The query must return two string arguments, i.e. a // name and a description. -func (s *Server) queryNameDesc(ctx context.Context, query string, args ...any) (result []nameDesc, err error) { +func (s *Server) QueryNameDesc(ctx context.Context, query string, args ...any) (result []NameDesc, err error) { var rows pgx.Rows if rows, err = s.Database.Query(ctx, query, args...); err != nil { @@ -31,13 +31,13 @@ func (s *Server) queryNameDesc(ctx context.Context, query string, args ...any) ( if err = rows.Scan(&name, &description); err != nil { return nil, err } - result = append(result, nameDesc{name, description}) + result = append(result, NameDesc{name, description}) } return result, rows.Err() } -// nameDesc holds a name and a description. -type nameDesc struct { +// NameDesc holds a name and a description. +type NameDesc struct { Name string Description string } -- cgit v1.2.3