profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/mvdan/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Daniel Martí mvdan @protocol Sheffield, United Kingdom https://mvdan.cc I work on stuff in Go.

golang/dep 13165

Go dependency management tool experiment (deprecated)

cuelang/cue 3136

Validate and define text-based and dynamic configuration

govim/govim 704

govim is a Go development plugin for Vim8, written in Go

mvdan/corpus 83

A corpus of popular Go modules

mvdan/accesspoint 75

Manage wireless access points in Android (abandoned)

mvdan/bitw 70

Minimalist BitWarden client

mvdan/benchinit 64

Benchmark the init cost of Go packages

mvdan/dockexec 37

Run Go tests inside a Docker image

mvdan/android-template 16

Android app template

mvdan/dotfiles 14

Here be dragons

startedruslashev/elfcat

started time in 3 hours

startedmvdan/gofumpt

started time in 4 hours

issue commentburrowers/garble

typecheck error: RequestCtx not declared by package fasthttp

Please provide more details. How can I reproduce this? I can't just run the command because I don't have your code.

you can try this one. i believe it doesn't work too

package main

import (
	"flag"
	"fmt"
	"log"

	"github.com/valyala/fasthttp"
)

var (
	addr     = flag.String("addr", ":8080", "TCP address to listen to")
	compress = flag.Bool("compress", false, "Whether to enable transparent response compression")
)

func main() {
	flag.Parse()

	h := requestHandler
	if *compress {
		h = fasthttp.CompressHandler(h)
	}

	if err := fasthttp.ListenAndServe(*addr, h); err != nil {
		log.Fatalf("Error in ListenAndServe: %s", err)
	}
}

func requestHandler(ctx *fasthttp.RequestCtx) {
	fmt.Fprintf(ctx, "Hello, world!\n\n")

	fmt.Fprintf(ctx, "Request method is %q\n", ctx.Method())
	fmt.Fprintf(ctx, "RequestURI is %q\n", ctx.RequestURI())
	fmt.Fprintf(ctx, "Requested path is %q\n", ctx.Path())
	fmt.Fprintf(ctx, "Host is %q\n", ctx.Host())
	fmt.Fprintf(ctx, "Query string is %q\n", ctx.QueryArgs())
	fmt.Fprintf(ctx, "User-Agent is %q\n", ctx.UserAgent())
	fmt.Fprintf(ctx, "Connection has been established at %s\n", ctx.ConnTime())
	fmt.Fprintf(ctx, "Request has been started at %s\n", ctx.Time())
	fmt.Fprintf(ctx, "Serial request number for the current connection is %d\n", ctx.ConnRequestNum())
	fmt.Fprintf(ctx, "Your ip is %q\n\n", ctx.RemoteIP())

	fmt.Fprintf(ctx, "Raw request is:\n---CUT---\n%s\n---CUT---", &ctx.Request)

	ctx.SetContentType("text/plain; charset=utf8")

	// Set arbitrary headers
	ctx.Response.Header.Set("X-My-Header", "my-header-value")

	// Set cookies
	var c fasthttp.Cookie
	c.SetKey("cookie-name")
	c.SetValue("cookie-value")
	ctx.Response.Header.SetCookie(&c)
}
Numenorean

comment created time in 9 hours

startedmvdan/sh

started time in 15 hours

issue openedburrowers/garble

typecheck error: RequestCtx not declared by package fasthttp

Error itself: typecheck error: .\main.go:91:39: RequestCtx not declared by package fasthttp Build with command: garble build --ldflags "-s -w"

created time in a day

startedmvdan/xurls

started time in a day

startedyggdrasil-network/yggdrasil-go

started time in a day

startedmvdan/gofumpt

started time in a day

fork Towerthousand/ohmyzsh

🙃 A delightful community-driven (with 1800+ contributors) framework for managing your zsh configuration. Includes 300+ optional plugins (rails, git, OSX, hub, docker, homebrew, node, php, python, etc), 140+ themes to spice up your morning, and an auto-update tool so that makes it easy to keep up with the latest updates from the community.

https://ohmyz.sh

fork in a day

startedmvdan/fdroidcl

started time in a day

startedmvdan/sh

started time in a day

startedmvdan/gofumpt

started time in 2 days

issue commentburrowers/garble

build failures when converting to syscall struct types

Recently I found another bug, if a pointer of structure is used as function return variable, it fails to parse as it's obfuscated, even with reflect.TypeOf, because upper level name is also obfuscated.

My solution is to create the same variable in function body, and use its address as return value

jm33-m0

comment created time in 2 days

push eventburrowers/garble

Daniel Martí

commit sha ec0bdc401299c978dc2784193571411c75a6450f

keep cgo-exported Go names non-obfuscated Otherwise, the added test case would fail, as we don't modify the C code and so there would be a name mismatch. In the far future we might start modifying Go names in C code, similar to what we did for Go assembly, but right now that seems out of scope and too complex. An easier fix is to simply record those (hopefully few) names in ignoreObjects. While at it, recordReflectArgs started to really outgrow its name, as it also collected expressions used as constants for literal obfuscation. Give it a better name. Fixes #366.

view details

push time in 2 days

issue closedburrowers/garble

garble build fails when calling Go -> C -> Go

When calling a C function from Go that calls a Go function, garble mangles the exported Go function, causing the build to fail.

develop[garble]% garble build
# gocgo/lib
/tmp/garble-shared1195802053/gocgo/lib/_cgo_gotypes.go:52:2: undefined: GoCallback
exit status 2
exit status 2

I'm aware this is a pretty niche edge case, so I put together a toy example that illustrates the problem.

The package to be garble'd provides a C function, which calls a Go function.

lib.go

package lib

// #include "ccallback.h"
import "C"
import "fmt"

func DoIt() {
	fmt.Printf("Starting main\n")
	C.CCallback()
}

ccallback.h

#include <stdio.h>

void GoCallback();

void CCallback() {
    printf("Hello from C!\n");
    GoCallback();
}

callback.go

package lib

import "C"

import "fmt"

//export GoCallback
func GoCallback() {
	fmt.Printf("Hello from Go!")
}

The garbled version of callback.go includes GoCallback, but with a mangled name.

//line :1



package YwoPTr1O

import _ "unsafe"

import "fmt"


func SLluVIAY() {
         /*line d6XlHlLH.go:1*/ fmt.Printf("Hello from Go!")
}

closed time in 2 days

kulinacs

PR merged burrowers/garble

Reviewers
keep cgo-exported Go names non-obfuscated

(see commit message)

+44 -14

0 comment

3 changed files

mvdan

pr closed time in 2 days

push eventburrowers/garble

Daniel Martí

commit sha 5f8bae06b7b2c959c9ea01956b2765cc5d03cfad

small improvements towards obfuscating the runtime I spent a couple of days trying to obfuscate all of std. Ultimately I failed at making it fully work, especially when it comes to the runtime package, but I did fix a few problems along the way, as seen here. First, fix the TODO to allow handleDirectives and transformGo to run on runtime packages as well, if they are considered private. Note that this is never true right now, but it matters once we remove runtimeRelated. Second, modify parsedebugvars in a way that doesn't break typechecking. We can remove AST nodes or even modify them in simple ways, but if we add new AST nodes after typechecking, those will lack type information. We were replacing the entire body, running into that problem. Instead, carefully cut the body to set some defaults, but remove everything from the point GODEBUG is read. Finally, add commented-out debug prints of transformed asm files. For #193.

view details

push time in 2 days

PR merged burrowers/garble

Reviewers
small improvements towards obfuscating the runtime

(see commit message)

+34 -42

0 comment

2 changed files

mvdan

pr closed time in 2 days

startedsheredom/subprocess.h

started time in 2 days

startedmvdan/sh

started time in 2 days

startedmvdan/sh

started time in 3 days

push eventmvmike/min-cal-widget

Miquel Martí

commit sha 0dc5aab6ecf5c3f0324610300f89ff9f095a371c

update every hour

view details

Miquel Martí

commit sha f7d7969aa73f20755a91cb13070b9802708d3205

handle receivers (un)registration in manifest

view details

Miquel Martí

commit sha 08eb3d9124a2a1bc3a7f09e5f5362bd8c19bc5af

clearAllConfiguration only when all instances deleted

view details

Miquel Martí

commit sha d2517969d2a99f903206f11e6e5734c8bd191410

migrate from mockito to mockk

view details

Miquel Martí

commit sha 45957e7c10e6d2b7b6a8632c86543188de6f1c82

stop using wildcard imports

view details

push time in 3 days

startedmvdan/github-actions-golang

started time in 4 days

startedmvdan/bitw

started time in 4 days

startedgoogle/gts

started time in 4 days

PR merged protocol/.github

chore: add ipfs/tar-utils
+1 -0

1 comment

1 changed file

marten-seemann

pr closed time in 4 days

push eventprotocol/.github

Marten Seemann

commit sha 00a750b0a4dbeef23572bf88b21d6825bb922ec3

chore: add ipfs/tar-utils

view details

Marten Seemann

commit sha adea1c0a1d1619aa0917aa50e3086a14cf89cf65

Merge pull request #115 from protocol/add-tar-utils chore: add ipfs/tar-utils

view details

push time in 4 days

delete branch protocol/.github

delete branch : add-tar-utils

delete time in 4 days

pull request commentprotocol/.github

chore: add ipfs/tar-utils

Do I have to trigger the PR getting rebased on master if there's a change between when the PR goes out and it gets merged, or does that happen automatically?

We'd have to do that manually, but if tests pass right away, we can just merge it immediately.

marten-seemann

comment created time in 4 days