@@ -152,15 +152,24 @@ func (s *FileScanner) scanWithParameters(
152152 return analysis , nil
153153}
154154
155- // ScanParameters sends a file to VirusTotal for scanning. The file content is
155+ // Deprecated: Use ScanWithParameters instead.
156+ //
157+ // This function is kept for backward compatibility, but for cohereence with
158+ // the rest of the library is has been renamed to ScanWithParameters.
159+ func (s * FileScanner ) ScanParameters (
160+ r io.Reader , filename string , progress chan <- float32 , parameters map [string ]string ) (* Object , error ) {
161+ return s .scanWithParameters (r , filename , progress , parameters )
162+ }
163+
164+ // ScanWithParameters sends a file to VirusTotal for scanning. The file content is
156165// read from the r io.Reader and sent to VirusTotal with the provided file name
157166// which can be left blank. The function also sends a float32 through the
158167// progress channel indicating the percentage of the file that has been already
159168// uploaded. The progress channel can be nil if the caller is not interested in
160169// receiving upload progress updates. An analysis object is returned as soon as
161170// the file is uploaded. Additional parameters can be passed to the scan
162171// by using the parameters map[string]string argument.
163- func (s * FileScanner ) ScanParameters (
172+ func (s * FileScanner ) ScanWithParameters (
164173 r io.Reader , filename string , progress chan <- float32 , parameters map [string ]string ) (* Object , error ) {
165174 return s .scanWithParameters (r , filename , progress , parameters )
166175}
0 commit comments