This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Command gobuilder starts a HTTP-server that will build Go binaries based on the path given. | |
// Works only for Go 1.11+ (requires modules support). | |
// | |
// Usage: | |
// GET /importpath/revision | |
// | |
// Binaries are built for server OS and architecture by default, this can be changed | |
// using GOOS and GOARCH env. variables. | |
// gobuilder overrides following env. variables: | |
// GO111MODULE, GOPATH, GOBIN, GOCACHE, CGO_ENABLED. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <fcntl.h> | |
#include <sys/stat.h> | |
#include <sys/mman.h> | |
void find_longest(const char *file, unsigned file_length, | |
const char **longest_start, unsigned *longest_len) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"errors" | |
"flag" | |
"log" | |
"net/http" | |
"os" | |
"path/filepath" | |
"strings" |