![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
github.com/kuhahalong/ddgsearch
A native Go library for DuckDuckGo search functionality. This library provides a simple and efficient way to perform searches using DuckDuckGo's search engine.
DuckDuckGo offers several advantages:
go get github.com/kuhahalong/ddgsearch
package main
import (
"context"
"fmt"
"log"
"time"
"github.com/kuhahalong/ddgsearch"
)
func main() {
// Create a new client with configuration
cfg := &ddgsearch.Config{
Timeout: 30 * time.Second,
MaxRetries: 3,
Cache: true,
}
client, err := ddgsearch.New(cfg)
if err != nil {
log.Fatal(err)
}
// Configure search parameters
params := &ddgsearch.SearchParams{
Query: "what is golang",
Region: ddgsearch.RegionUSEN,
SafeSearch: ddgsearch.SafeSearchModerate,
TimeRange: ddgsearch.TimeRangeMonth,
MaxResults: 10,
}
// Perform search
response, err := client.Search(context.Background(), params)
if err != nil {
log.Fatal(err)
}
// Print results
for i, result := range response.Results {
fmt.Printf("%d. %s\n URL: %s\n Description: %s\n\n",
i+1, result.Title, result.URL, result.Description)
}
}
// Create client with custom configuration
cfg := &ddgsearch.Config{
Timeout: 20 * time.Second,
MaxRetries: 3,
Proxy: "http://proxy:8080",
Cache: true,
Headers: map[string]string{
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36",
},
}
client, err := ddgsearch.New(cfg)
params := &ddgsearch.SearchParams{
Query: "golang tutorial", // Search query
Region: ddgsearch.RegionUSEN, // Region for results (us-en, uk-en, etc.)
SafeSearch: ddgsearch.SafeSearchModerate, // Safe search level
TimeRange: ddgsearch.TimeRangeWeek, // Time filter
MaxResults: 10, // Maximum results to return
}
Available regions:
Safe search levels:
Time range options:
// HTTP proxy
cfg := &ddgsearch.Config{
Proxy: "http://proxy:8080",
}
client, err := ddgsearch.New(cfg)
// SOCKS5 proxy
cfg := &ddgsearch.Config{
Proxy: "socks5://proxy:1080",
}
client, err := ddgsearch.New(cfg)
The library includes a command-line interface (CLI) tool for easy access to DuckDuckGo search functionality.
go install github.com/kuhahalong/ddgsearch/cmd/ddgs@latest
# Basic text search
ddgs search "golang programming"
# Search news
ddgs news "golang 1.21"
For more information, see README.md
Contributions are welcome! Please feel free to submit issues and pull requests.
git clone https://github.com/kuhahalong/ddgsearch.git
go mod tidy
go test ./...
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.