Documentation
ΒΆ
Overview ΒΆ
Package seowebchecker provides an automated technical SEO audit engine and client SDK for web developers, site owners, and automated CI/CD pipelines.
It audits on-page technical SEO signals including:
- Title tag length (30-60 chars) and relevance
- Meta description presence and length (50-160 chars)
- Mobile viewport configuration for responsive web design
- Canonical URL validation to avoid duplicate content penalties
- Heading hierarchy (ensuring single, prominent H1)
- Image accessibility (alt attribute presence)
- OpenGraph social media preview metadata (og:title, og:image)
- Letter grade (A-F) and 0-100 numerical score calculation
For live interactive web auditing, visual reports, and domain rank tracking, visit https://seowebchecker.com.
Quick Start ΒΆ
To install the package in your Go module:
go get github.com/jaiganesh6999/seowebchecker-seoaudit-sdk
Example usage:
package main
import (
"fmt"
"github.com/jaiganesh6999/seowebchecker-seoaudit-sdk"
)
func main() {
html := `<!DOCTYPE html><html><head><title>Optimal Title Here 30 to 60 Chars</title>` +
`<meta name="description" content="Engaging meta description between 50 and 160 characters for best SEO results.">` +
`<meta name="viewport" content="width=device-width, initial-scale=1.0">` +
`<link rel="canonical" href="https://example.com/page">` +
`</head><body><h1>Main Headline</h1><img src="pic.jpg" alt="Description"></body></html>`
result := seowebchecker.AuditHTML(html, "https://example.com/page")
fmt.Printf("Overall Score: %d/100 (Grade %s)\n", result.Score.Overall, result.Score.Grade)
}
Full online SEO tools, snippet simulators, and rank checkers are available at https://seowebchecker.com.
Package seowebchecker provides a lightweight client SDK and utility suite for automated on-page technical SEO audits, meta tag validations, heading structure inspections, image accessibility analysis, and Core Web Vitals checks.
Powered by SEOWebChecker (https://seowebchecker.com).
Index ΒΆ
Examples ΒΆ
Constants ΒΆ
This section is empty.
Variables ΒΆ
This section is empty.
Functions ΒΆ
This section is empty.
Types ΒΆ
type AuditResult ΒΆ
type AuditResult struct {
URL string `json:"url"`
Score SeoScore `json:"score"`
TotalChecks int `json:"total_checks"`
PassedChecks int `json:"passed_checks"`
Warnings int `json:"warnings"`
Errors int `json:"errors"`
Issues []Issue `json:"issues"`
Metadata map[string]string `json:"metadata"`
}
AuditResult represents the complete SEO report for a page.
func AuditHTML ΒΆ
func AuditHTML(htmlStr, targetURL string) *AuditResult
AuditHTML provides a convenient package-level function to audit an HTML string.
Example ΒΆ
package main
import (
"fmt"
"github.com/jaiganesh6999/seowebchecker-seoaudit-sdk"
)
func main() {
sampleHTML := `<!DOCTYPE html>
<html>
<head>
<title>Optimal Website Title Tag for High Search Ranking</title>
<meta name="description" content="A comprehensive guide to modern on-page technical SEO and Core Web Vitals optimization.">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://example.com/guide">
<meta property="og:title" content="Optimal Website Title Tag">
<meta property="og:image" content="https://example.com/banner.jpg">
</head>
<body>
<h1>Mastering Technical SEO</h1>
<img src="chart.png" alt="SEO Performance Growth">
</body>
</html>`
result := seowebchecker.AuditHTML(sampleHTML, "https://example.com/guide")
fmt.Printf("Grade: %s, Score: %d\n", result.Score.Grade, result.Score.Overall)
fmt.Printf("Passed: %d, Warnings: %d, Errors: %d\n", result.PassedChecks, result.Warnings, result.Errors)
}
Output: Grade: A, Score: 100 Passed: 7, Warnings: 0, Errors: 0
func AuditURL ΒΆ
func AuditURL(targetURL string) (*AuditResult, error)
AuditURL provides a convenient package-level function to fetch and audit a website URL.
type Auditor ΒΆ
Auditor provides configurable methods to perform SEO audits.
func NewAuditor ΒΆ
func NewAuditor() *Auditor
NewAuditor returns a new Auditor initialized with default timeout and user agent.
Example ΒΆ
package main
import (
"fmt"
"github.com/jaiganesh6999/seowebchecker-seoaudit-sdk"
)
func main() {
auditor := seowebchecker.NewAuditor()
auditor.UserAgent = "MyCustomCrawler/1.0"
html := `<!DOCTYPE html><html><head><title>Title Tag 30 to 60 Chars Here</title></head><body></body></html>`
result := auditor.AuditHTML(html, "https://example.com")
fmt.Println("Audited URL:", result.URL)
}
Output: Audited URL: https://example.com
func (*Auditor) AuditHTML ΒΆ
func (a *Auditor) AuditHTML(htmlStr, targetURL string) *AuditResult
AuditHTML evaluates an HTML string against on-page technical SEO best practices.
type Issue ΒΆ
type Issue struct {
ID string `json:"id"`
Category string `json:"category"`
Severity Severity `json:"severity"`
Title string `json:"title"`
Message string `json:"message"`
Recommendation string `json:"recommendation"`
}
Issue represents an individual diagnostic check finding.
type SeoScore ΒΆ
SeoScore contains the overall calculated numerical score (0-100) and letter grade (A-F).
type Severity ΒΆ
type Severity string
Severity represents the severity level of an SEO check.
const ( // SeverityPass indicates that the diagnostic check passed. SeverityPass Severity = "pass" // SeverityWarning indicates that the diagnostic check generated a warning. SeverityWarning Severity = "warning" // SeverityError indicates that a critical SEO issue was found. SeverityError Severity = "error" )