Quarantine an Infected File in Go

When an infected file is located via a virus scan, proper containment steps need to be taken to ensure it doesn’t contaminate any other files or programs within your application. In this tutorial, we will demonstrate how to use an API in Go to quarantine a dangerous file by creating a zip archive and applying encryption and password protection.

To call the API function, all you need to do is input the password for the ZIP archive, the target file, and your API key into the following code:

package main

The file or files that were flagged as threats will be efficiently separated and subdued. If you need to obtain an API key, you can do so by registering for a free account on the Cloudmersive website; this provides 800 monthly calls across our entire library of APIs.

There’s an API for that. Cloudmersive is a leader in Highly Scalable Cloud APIs.