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 $(STATIC): $(JSFILES) client/node_modules
npm --prefix client run build-prod 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/... GOOS=$(NATIVE_GOOS) GOARCH=$(NATIVE_GOARCH) GO111MODULE=off go get -v github.com/gobuffalo/packr/...
PATH=$(GOPATH)/bin:$(PATH) packr -z 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)" 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 ( import (
"encoding/json" "encoding/json"

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
package main package home
import ( import (
"bufio" "bufio"
@ -49,7 +49,7 @@ const (
) )
// main is the entry point // 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 // 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 // therefore, we must do it manually instead of using a lib
args := loadOptions() args := loadOptions()
@ -174,7 +174,7 @@ func run(args options) {
go periodicallyRefreshFilters() go periodicallyRefreshFilters()
// Initialize and run the admin Web interface // 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 / // if not configured, redirect / to /install.html, otherwise redirect /install.html to /
http.Handle("/", postInstallHandler(optionalAuthHandler(gziphandler.GzipHandler(http.FileServer(box))))) http.Handle("/", postInstallHandler(optionalAuthHandler(gziphandler.GzipHandler(http.FileServer(box)))))

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

9
main.go Normal file
View File

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