Introduced DuckDuckGo as a new search provider alongside Google. Implemented a flexible caching system with in-memory, file-based, and no-op cache options to improve modularity. Updated dependencies and revised the project structure for improved maintainability.
		
			
				
	
	
		
			39 lines
		
	
	
		
			537 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			39 lines
		
	
	
		
			537 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package cache
 | 
						|
 | 
						|
import (
 | 
						|
	"io"
 | 
						|
)
 | 
						|
 | 
						|
type Nop struct {
 | 
						|
}
 | 
						|
 | 
						|
var _ Cache = Nop{}
 | 
						|
 | 
						|
func (Nop) Get(_ string, _ io.Writer) error {
 | 
						|
	return ErrNotFound
 | 
						|
}
 | 
						|
 | 
						|
func (Nop) GetString(_ string) (string, error) {
 | 
						|
	return "", ErrNotFound
 | 
						|
}
 | 
						|
 | 
						|
func (Nop) GetJSON(_ string, _ interface{}) error {
 | 
						|
	return ErrNotFound
 | 
						|
}
 | 
						|
 | 
						|
func (Nop) Set(_ string, _ io.Reader) error {
 | 
						|
	return nil
 | 
						|
}
 | 
						|
 | 
						|
func (Nop) SetJSON(_ string, _ interface{}) error {
 | 
						|
	return nil
 | 
						|
}
 | 
						|
 | 
						|
func (Nop) SetString(_ string, _ string) error {
 | 
						|
	return nil
 | 
						|
}
 | 
						|
 | 
						|
func (Nop) Delete(_ string) error {
 | 
						|
	return nil
 | 
						|
}
 |