Early telegram integrations
This commit is contained in:
@@ -3,6 +3,7 @@ package utils
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
@@ -20,6 +21,7 @@ func CacheStream( path string, readStream func() ( io.ReadCloser, error ), expir
|
||||
f, err := os.Open( path )
|
||||
if err == nil {
|
||||
defer f.Close()
|
||||
log.Printf( "Using cache: %s", path )
|
||||
writeBuff := bytes.NewBuffer( []byte{} )
|
||||
_, err = io.Copy( writeBuff, f )
|
||||
if err == nil {
|
||||
|
Reference in New Issue
Block a user