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
+4.7k Golang : How to pass data between controllers with JSON Web Token
+8.3k Golang : Count leading or ending zeros(any item of interest) example
+8.7k Golang : Find duplicate files with filepath.Walk
+24.6k Golang : How to print rune, unicode, utf-8 and non-ASCII CJK(Chinese/Japanese/Korean) characters?
+14.9k Golang : Submit web forms without browser by http.PostForm example
+10.7k Golang : Get currencies exchange rates example
+15.3k Golang : Get all local users and print out their home directory, description and group id
+25.7k Golang : How to write CSV data to file
+21.2k Golang : How to force compile or remove object files first before rebuild?
+19.3k Golang : Get host name or domain name from IP address
+7.9k Javascript : Put image into Chrome browser's console
+18.6k Golang : Get download file size