Fix outdated depstubber command

This commit is contained in:
Owen Mansel-Chan
2025-03-20 12:32:56 +00:00
parent 40768332d8
commit 6147f0a873
2 changed files with 30 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
package main
//go:generate depstubber -vendor github.com/go-pg/pg Conn,DB,Tx Q
//go:generate depstubber -vendor github.com/go-pg/pg/orm Query Q
//go:generate depstubber -vendor github.com/go-pg/pg/orm Query,Formatter Q
//go:generate depstubber -vendor github.com/go-pg/pg/v9 Conn,DB,Tx Q
import (

View File

@@ -2,7 +2,7 @@
// This is a simple stub for github.com/go-pg/pg/orm, strictly for use in testing.
// See the LICENSE file for information about the licensing of the original library.
// Source: github.com/go-pg/pg/orm (exports: Query, Formatter; functions: Q)
// Source: github.com/go-pg/pg/orm (exports: Query,Formatter; functions: Q)
// Package orm is a stub of github.com/go-pg/pg/orm, generated by depstubber.
package orm
@@ -94,6 +94,34 @@ func (_ *Field) Value(_ reflect.Value) reflect.Value {
return reflect.Value{}
}
type Formatter struct{}
func (_ Formatter) Append(_ []byte, _ string, _ ...interface{}) []byte {
return nil
}
func (_ Formatter) AppendBytes(_ []byte, _ []byte, _ ...interface{}) []byte {
return nil
}
func (_ Formatter) FormatQuery(_ []byte, _ string, _ ...interface{}) []byte {
return nil
}
func (_ Formatter) Param(_ string) interface{} {
return nil
}
func (_ Formatter) String() string {
return ""
}
func (_ Formatter) WithParam(_ string, _ interface{}) Formatter {
return Formatter{}
}
func (_ *Formatter) SetParam(_ string, _ interface{}) {}
type Method struct {
Index int
}
@@ -491,18 +519,3 @@ type TableModel interface {
Table() *Table
Value() reflect.Value
}
type Formatter struct {
}
func (f Formatter) Append(dst []byte, src string, params ...interface{}) []byte {
return nil
}
func (f Formatter) AppendBytes(dst, src []byte, params ...interface{}) []byte {
return nil
}
func (f Formatter) FormatQuery(dst []byte, query string, params ...interface{}) []byte {
return nil
}