tgulacsi@nell:~/projects/aostor/srv_aostor$ rm -rf ~/projects/go/pkg && (cd .. && go fmt && go build) && go fmt && go build
# _/home/tgulacsi/projects/aostor/srv_aostor
./server.go:36: config.ok redeclared in this block
previous declaration at ./server.go:36
tgulacsi@nell:~/projects/aostor/srv_aostor$ head -n 50 server.go
// Copyright 2012 Tamás Gulácsi, UNO-SOFT Computing Ltd.
// This file is part of aostor.
// Aostor is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Aostor is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Aostor. If not, see <
http://www.gnu.org/licenses/>.
// Append-Only Storage HTTP server
package main
import _ "net/http/pprof" // pprof
import (
"bufio"
"encoding/base64"
"flag"
"fmt"
"io"
"log"
"net/http"
"os"
"os/signal"
"runtime"
"strings"
"syscall"
"time"
"
unosoft.hu/aostor"
)
var logger = log.New(os.Stderr, "server ", log.LstdFlags|log.Lshortfile)
var MaxRequestMemory = 20 * int64(1<<20)
func main() {
defer aostor.FlushLog()
configfile := flag.String("c", aostor.ConfigFile, "config file")
hostport := flag.String("http", "",
"host:port, default="+aostor.DefaultHostport)
flag.Parse()
conf, err := aostor.ReadConf(*configfile, "")
if err != nil {
logger.Fatalf("cannot read configuration %s: %s", *configfile, err)
I've bisected since 8e87cb8dca7d (actual tip is 93dc7f0e302b)
The first bad revision is:
changeset: 14713:bb4ee132b967
user: Luuk van Dijk <lvd at golang dot org>
date: Mon Oct 29 13:55:27 2012 +0100
summary: cmd/gc: inlining functions with local variables
1. Is this really an errror in gc, or PEBKAC?
2. will it be fixed?
Thanks,
GThomas