Documentation
¶
Overview ¶
Package gentestfiles provides utilities for generating test files with valid content based on their file extensions. It supports creating test images (JPEG, PNG, GIF), text files, and other file types for testing purposes.
Example ¶
package main
import (
"log"
gentestfiles "github.com/lbe/sfpg-go/internal/gen-test-files"
)
func main() {
filePaths := []string{
"file1.txt",
"file2.html",
"images/photo.jpg",
"images/icon.png",
"graphics/animation.gif",
"nested/deep/path/document.txt",
}
if err := gentestfiles.CreateTestFiles("test_output", filePaths); err != nil {
log.Fatal(err)
}
// Output files will be created in ./test_output/
}
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTestFiles ¶
CreateTestFiles creates test files with valid content based on their extensions in the specified directory.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.