Add finish context to mockengine
This commit is contained in:
		
							parent
							
								
									975720919c
								
							
						
					
					
						commit
						37973a6c9b
					
				@ -10,7 +10,7 @@ type MockEngine struct {
 | 
			
		||||
	InitFunc   func(context.Context) (bool, error)
 | 
			
		||||
	ExecFunc   func(context.Context, []byte) (bool, error)
 | 
			
		||||
	FlushFunc  func(context.Context, io.Writer) (int, error)
 | 
			
		||||
	FinishFunc func() error
 | 
			
		||||
	FinishFunc func(context.Context) error
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *MockEngine) Init(ctx context.Context) (bool, error) {
 | 
			
		||||
@ -25,6 +25,6 @@ func (m *MockEngine) Flush(ctx context.Context, w io.Writer) (int, error) {
 | 
			
		||||
	return m.FlushFunc(ctx, w)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (m *MockEngine) Finish() error {
 | 
			
		||||
	return m.FinishFunc()
 | 
			
		||||
func (m *MockEngine) Finish(ctx context.Context) error {
 | 
			
		||||
	return m.FinishFunc(ctx)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user