Thanks Ian.
changing it to
*http.Handle("/static/", http.FileServer(http.FS(fs.Sub(static,"files"*
did work.
On Tuesday, 24 January 2023 at 01:52:40 UTC+5:30 Ian Lance Taylor wrote:
> On Mon, Jan 23, 2023 at 11:51 AM Shammi Shailaj
> wrote:
> >
> > There is no function named Sub() for t
package main
import (
"bytes"
"crypto/tls"
"fmt"
"io"
"io/ioutil"
"mime/multipart"
"net/http"
"os"
"path/filepath"
"strconv"
"sync"
"time"
)
func main() {
test()
time.Sleep(10 * time.Minute)
}
func test() {
for i := 0; i < 50; i++ {
On Tue, Jan 24, 2023 at 7:15 PM nc wrote:
>
> Thanks! This is quite helpful information. I have one small followup
> question: when you use make([]type, len) and assign, if you were using a
> range loop, that would require an index variable right? In the case of
> ranging over a slice or array
Thanks! This is quite helpful information. I have one small followup
question: when you use make([]type, len) and assign, if you were using a
range loop, that would require an index variable right? In the case of
ranging over a slice or array or string you could use the range's index
variable,
On Tue, Jan 24, 2023 at 12:01 PM nc wrote:
>
> I have some sample code here: https://play.golang.com/p/H4kOGxamk0_D
>
> I have used a pattern in the above playground snippet (twice: once in
> uniqueValues() and once in keys()) that declares and initializes a slice
> like: s := make([]T, 0, known
Hi,
I have some sample code here: https://play.golang.com/p/H4kOGxamk0_D
I have used a pattern in the above playground snippet (twice: once in
uniqueValues() and once in keys()) that declares and initializes a slice
like: s := make([]T, 0, knownLength) . Then it ranges over something
containin
Hi All,
Golang version 1.18.2
Have a kvstore implemented in golang. There is a proxy layer that
communicates with storage that uses CGo for data access from storage
engine. Both proxy and storage are implemented in golang. I observe that
there are occasional spikes in the latency. (< 0.01%