Merge: * move ./*.go files into ./home/ directory

* commit 'dc682763ff61874eb6043eaac5fa0eba17f7ddec':
  * move ./*.go files into ./home/ directory
This commit is contained in:
Simon Zolin 2019-06-10 12:07:57 +03:00
commit 6187871e3b
27 changed files with 37 additions and 28 deletions

View File

@ -20,7 +20,7 @@ client/node_modules: client/package.json client/package-lock.json
$(STATIC): $(JSFILES) client/node_modules
npm --prefix client run build-prod
$(TARGET): $(STATIC) *.go dhcpd/*.go dnsfilter/*.go dnsforward/*.go
$(TARGET): $(STATIC) *.go home/*.go dhcpd/*.go dnsfilter/*.go dnsforward/*.go
GOOS=$(NATIVE_GOOS) GOARCH=$(NATIVE_GOARCH) GO111MODULE=off go get -v github.com/gobuffalo/packr/...
PATH=$(GOPATH)/bin:$(PATH) packr -z
CGO_ENABLED=0 go build -ldflags="-s -w -X main.VersionString=$(GIT_VERSION) -X main.updateChannel=$(CHANNEL)" -asmflags="-trimpath=$(PWD)" -gcflags="-trimpath=$(PWD)"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"encoding/json"

View File

@ -1,4 +1,4 @@
package main
package home
import "testing"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"io/ioutil"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"bytes"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"encoding/json"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"context"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"testing"

View File

@ -1,6 +1,6 @@
// Control: TLS configuring handlers
package main
package home
import (
"context"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"archive/tar"

View File

@ -1,6 +1,6 @@
// +build ignore
package main
package home
import (
"os"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"encoding/json"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"fmt"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"testing"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"fmt"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"bufio"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"testing"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"bufio"
@ -49,7 +49,7 @@ const (
)
// main is the entry point
func main() {
func Main() {
// config can be specified, which reads options from there, but other command line flags have to override config values
// therefore, we must do it manually instead of using a lib
args := loadOptions()
@ -174,7 +174,7 @@ func run(args options) {
go periodicallyRefreshFilters()
// Initialize and run the admin Web interface
box := packr.NewBox("build/static")
box := packr.NewBox("../build/static")
// if not configured, redirect / to /install.html, otherwise redirect /install.html to /
http.Handle("/", postInstallHandler(optionalAuthHandler(gziphandler.GzipHandler(http.FileServer(box)))))

View File

@ -1,4 +1,4 @@
package main
package home
import (
"fmt"

View File

@ -1,6 +1,6 @@
// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
package main
package home
import (
"os"

View File

@ -1,4 +1,4 @@
package main
package home
import "golang.org/x/sys/windows"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"os"

View File

@ -1,6 +1,6 @@
// +build !windows,!nacl,!plan9
package main
package home
import (
"log"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"log"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"fmt"

View File

@ -1,4 +1,4 @@
package main
package home
import (
"fmt"

9
main.go Normal file
View File

@ -0,0 +1,9 @@
package main
import (
"github.com/AdguardTeam/AdGuardHome/home"
)
func main() {
home.Main()
}