Golang archive/zip.FileInfoHeader() function usage example
package archive/zip
FileInfoHeader creates a partially-populated FileHeader from an os.FileInfo. Because os.FileInfo's Name method returns only the base name of the file it describes, it may be necessary to modify the Name field of the returned header to provide the full path name of the file.
zip.FileInfoHeader() function usage example
fileInfo := file.Stat()
header := zip.FileInfoHeader(fileInfo)
Advertisement
Something interesting
Tutorials
+7.5k Golang : Gorrila set route name and get the current route name
+21.2k Golang : How to get time zone and load different time zone?
+22.1k Golang : Match strings by wildcard patterns with filepath.Match() function
+10.3k Golang : Embed secret text string into binary(executable) file
+7.3k Golang : File system scanning
+6.5k Golang : Calculate diameter, circumference, area, sphere surface and volume
+5.4k Gogland : Datasource explorer
+5.4k Golang : Intercept, inject and replay HTTP traffics from web server
+8.4k Golang : How to check if input string is a word?
+12.8k Golang : Convert int(year) to time.Time type
+9.2k nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
+9k Golang : Go as a script or running go with shebang/hashbang style