Hi!
On Wed, 09 Oct 2024, Ken Lee wrote:
> On Tuesday 14 November 2023 at 7:23:44 am UTC+8 Oliver Lowe wrote:
>
> > > I'd be curious to hear thoughts on this topic.
> >
> > There was a fun talk at GopherConAU just a few days ago: "What's
> > The Point? A Guide To Using Pointers Without Panicking"
Hi!
On https://pkg.go.dev/cmd/go#hdr-Remote_import_paths, in the section
about using meta tags to redirect from some domain to a known forge, it
says:
> For example,
>
> `import "example.org/pkg/foo"`
>
> will result in the following requests:
>
> `https://example.org/pkg/foo?go-get=1`
>
>
Hi!
On Sat, 15 Jun 2024, Peter Galbavy wrote:
> If end binary size is a constraint, try "upx" to compress the end binary. I
> regularly get 3x compression - but lose all debug options, obviously. Works
> on most OSes for executables.
Be aware that there are further consequences to using upx, b
Hi!
On Fri, 10 May 2024, Ian Lance Taylor wrote:
> This is a choice made by Go. You can override with the -modcacherw
> option to "go build", "go test", "go install", and similar code. You
> can make that option the default by setting GOFLAGS in the environment
> or via "go env GOFLAGS=...".
>
Hi!
I test and try a whole load of Go tools and libraries, and as a result,
my ~go/pkg dir quickly grows. While I'd love some kind of automatic
expiry for that cache, I am fine with just occasionally running rm-rf on
that dir myself.
... except it doesn't work. For some unclear reason, some of th
Hi!
On Thu, 14 Sep 2023, Brian Candler wrote:
> Could you just unmarshal it to a map[string]IntTSList, and then walk it and
> build whatever structure you want?
I will try and make that work tomorrow, thanks for the hint!
> If you want to pick certain fixed fields into a struct and separate out
Hi!
On Thu, 14 Sep 2023, Peter Galbavy wrote:
> You will need to create a custom type and unmarshal method. Plenty of
> example if you search for "golang custom json unmarshal".
>
> As I've only had to implement it for a couple of simple types I can't offer
> my own valid example.
I am aware
Hi!
I am trying to write Prometheus exporter for stats queried fro the Kea
DHCP server. Unfortunatly, the JSON is structured very badly if I want
to use the base library JSON Unmarshal functionality:
{
"arguments": {
"cumulative-assigned-addresses": [ [ 1, "2023-09-13
12
Hi!
So I have been looking at golang v1.21, and while I like the slog
package in principle, it really annoys me that there is no way to get a
new slog Logger *that I can specify the underlying log.Logger for*.
It seems I have to implement a complete slog.Handler myself, which is
six miles of co
Hi!
First off, thanks both Ian and Andrew!
On Sat, 20 May 2023, Ian Lance Taylor wrote:
> On Sat, May 20, 2023 at 1:23 AM Tobias Klausmann
> wrote:
> > What I wonder about is the collection stage: the assumption that there
> > will be exactly as many results as inputs
Hi!
I find myself often writing tools that follow the pattern in the
subject, that is:
- Gather some input to process, e.g. a list of filenames from the
command line. If this can be streamed (processing starting before
knowing all inputs) even better, but not strictly necessary.
- Start N wo
Hi!
On Mon, 06 Feb 2023, quin...@gmail.com wrote:
> I would like to be able to extract the VCS branch name used during build.
> Currently I append "-X main.BranchName=${BRANCH}" to the build line which
> works, but I was hoping there might be a cunning way to extract this from
> runtime/debug?
Hi!
On Sat, 14 Jan 2023, Pat Farrell wrote:
> On Saturday, January 14, 2023 at 6:52:15 PM UTC-5 raf wrote:
>> The function you implement (WalkDirFunc should receive "p" as the path to
>> the parent (that seems to be what you want) and "d" as the current
>> directory entry. I am not sure why in
Hi!
On Fri, 23 Sep 2022, fliter wrote:
> Is it because it is time to go to the kitchen to cook? It seems that 3:04
> PM is too early
My best guess: it's the most common way kitchen timers that also are
clocks display the time. It's not the specific time that is
"kitchen"-likem, but rather the f
Hi!
On Wed, 12 Jan 2022, Rob Pike wrote:
> What's wrong with
>for ;; time.Sleep(delay) { ... }
> ?
>
> This technique is as old as the hills. Or at least as old as C for loops.
Never been a C guy :) Thanks, that works perfectly!
Best,
Tobias
--
You received this message because you are s
Hi!
Often with tools that poll something, you get code of this form:
```
for {
r, err := doSomeCall()
if err != nil {
log.Printf("Some error:", err)
continue
}
s, err := doSomeOtherCall(r)
if err != nil {
log.Printf(
Hi!
On Tue, 27 Jul 2021, Tamás Gulácsi wrote:
> First, sort all the bytes (0-255) with Go and .Net, and compare them.
> For Unicode-unaware sorting, that'd be enough: create a mapping between the
> two tables,
> replace all the bytes in the Go's input before sort (or use a Less that
> does the
Hi!
On Wed, 28 Jul 2021, James wrote:
> It could be that .NET is using some locale based collation. Seems like a
> lot of machinery, but might do the trick
> https://pkg.go.dev/golang.org/x/text@v0.3.6/collate
I have managed to get the .NET code used for sorting:
Files.Sort((x, y) => string.Com
Hi!
I am writing a tool that handles files and generates some sorted
output. Since this tool is to be a replacement for part of
another system (written in C#/.NET), the output must be a
byte-exact duplicate.
The existing system generates some checksums and filenames in a
stable sorted order, lik
19 matches
Mail list logo