About 17,000,000 results
Open links in new tab
  1. go - What is the meaning of '*' and '&'? - Stack Overflow

    Golang does not allow pointer-arithmetic (arrays do not decay to pointers) and insecure casting. All downcasts will be checked using the runtime-type of the variable and either panic or return …

  2. go - What is a rune? - Stack Overflow

    What is a rune in Go? I've been googling but Golang only says in one line: rune is an alias for int32. But how come integers are used all around like swapping cases? The following is a …

  3. The maximum value for an int type in Go - Stack Overflow

    How does one specify the maximum value representable for an unsigned integer type? I would like to know how to initialize min in the loop below that iteratively computes min and max …

  4. Format a Go string without printing? - Stack Overflow

    Is there a simple way to format a string in Go without printing the string? I can do: bar := "bar" fmt.Printf("foo: %s", bar) But I want the formatted string returned rather than printed so I can

  5. Is there a way to iterate over a range of integers?

    Go's range can iterate over maps and slices, but I was wondering if there is a way to iterate over a range of numbers, something like this: for i := range [1..10] { fmt.Println(i) } Or is ther...

  6. go - Contains method for a slice - Stack Overflow

    Is there anything similar to a slice.contains(object) method in Go without having to do a search through each element in a slice?

  7. How to do a https request with bad certificate? - Stack Overflow

    229 Say I want to get https://golang.org programatically. Currently golang.org (ssl) has a bad certificate which is issued to *.appspot.com So when I run this:

  8. What is the best way to test for an empty string in Go?

    That said, golang treats a string as a slice of runes and I'm not sure if one refers to a slice as empty or zero length. I would imagine that consistency is better. I was once an ASM clock …

  9. How do I send a JSON string in a POST request in Go

    According to golang.org/pkg/net/http/#Post, "Caller should close resp.Body when done reading from it. If the provided body is an io.Closer, it is closed after the request." How can I tell, as a …

  10. How to delete an element from a Slice in Golang

    Yes this is idiomatic way in Golang, and even in C/Assembly removing one random element from sorted array is expensive, you need shift (copy) all right elements one position to the left. Yes …