Skip to content

Commit

Permalink
Restructure repository as per Standard Go Project Layout
Browse files Browse the repository at this point in the history
  • Loading branch information
bdwyertech committed Oct 25, 2019
1 parent f971446 commit be2910d
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 10 deletions.
9 changes: 9 additions & 0 deletions cmd/gontlm-proxy/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package main

import (
proxy "github.com/bdwyertech/gontlm-proxy/pkg/gontlm-proxy"
)

func main() {
proxy.Run()
}
2 changes: 1 addition & 1 deletion cert.go → pkg/gontlm-proxy/cert.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package ntlm_proxy

import (
"crypto/tls"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package ntlm_proxy

import (
"crypto/rand"
Expand Down
2 changes: 1 addition & 1 deletion dialcontext.go → pkg/gontlm-proxy/dialcontext.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package ntlm_proxy

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// +build !windows

package main
package ntlm_proxy

import (
"context"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// +build windows

package main
package ntlm_proxy

import (
"bufio"
Expand Down
4 changes: 2 additions & 2 deletions gontlm-proxy.go → pkg/gontlm-proxy/gontlm-proxy.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package ntlm_proxy

import (
"github.com/bhendo/concord"
Expand All @@ -10,7 +10,7 @@ import (
"regexp"
)

func main() {
func Run() {
proxyServer := getEnv("GONTLM_PROXY", getProxyServer())
bind := getEnv("GONTLM_BIND", ":53128")
log.Printf("INFO: Forwarding Proxy is: %s\n", proxyServer)
Expand Down
2 changes: 1 addition & 1 deletion helpers.go → pkg/gontlm-proxy/helpers.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main
package ntlm_proxy

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion helpers_other.go → pkg/gontlm-proxy/helpers_other.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// +build !windows

package main
package ntlm_proxy

import (
"os"
Expand Down
2 changes: 1 addition & 1 deletion helpers_windows.go → pkg/gontlm-proxy/helpers_windows.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// +build windows
package main
package ntlm_proxy

import (
"golang.org/x/sys/windows/registry"
Expand Down

0 comments on commit be2910d

Please sign in to comment.