mirror of
https://github.com/Kagami/go-face.git
synced 2025-10-05 15:46:52 +08:00
Call Close in test and example
For better self-documentation.
This commit is contained in:
@@ -20,6 +20,8 @@ func Example_basic() {
|
||||
if err != nil {
|
||||
log.Fatalf("Can't init face recognizer: %v", err)
|
||||
}
|
||||
// Free the resources when you're finished.
|
||||
defer rec.Close()
|
||||
|
||||
// Test image with 10 faces.
|
||||
testImagePristin := filepath.Join(dataDir, "pristin.jpg")
|
||||
|
@@ -181,3 +181,7 @@ func TestIdols(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestClose(t *testing.T) {
|
||||
rec.Close()
|
||||
}
|
||||
|
Reference in New Issue
Block a user