Skip to content

eaigner/clam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clamav bindings for Go

You will need pkg-config and clamav installed to compile this package. If you are on OSX you can install those using homebrew.

brew install pkgconfig
brew install clamav

Example

engine := clam.New()

err = engine.Compile("cvd")
if err != nil {
  panic(err)
}

// Scan file that contains virus
file, err := os.Open("eicar")
if err != nil {
  panic(err)
}

// If a virus is found a VirusError is returned
err = engine.Scan(file)
if err != nil {
  fmt.Println("virus found:", err)
}

// If you want to refresh the engine, call Destroy() and recompile with Compile()

About

clamav bindings for Go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published