using different library

pull/17694/head
absolutelightning 1 year ago
parent 55dba95cdc
commit 6b0a813612

@ -17,12 +17,18 @@ func makeBootstrapTemp(bootstrapJSON []byte) (string, error) {
tempFile := filepath.Join(os.TempDir(), tempFile := filepath.Join(os.TempDir(),
fmt.Sprintf("envoy-%x-bootstrap.json", time.Now().UnixNano()+int64(os.Getpid()))) fmt.Sprintf("envoy-%x-bootstrap.json", time.Now().UnixNano()+int64(os.Getpid())))
f, err := mmap.Map(tempFile) file, err := os.OpenFile(tempFile, os.O_RDWR, 0644)
if err != nil {
return tempFile, err
}
f, err := mmap.Map(file)
if err != nil { if err != nil {
return tempFile, err return tempFile, err
} }
defer f.UnMap() defer f.Unmap()
f.Write(bootstrapJSON) f.Write(bootstrapJSON)
f.Sync() f.Sync()

Loading…
Cancel
Save