Skip to content

Commit

Permalink
fix: fix qrcode output addr
Browse files Browse the repository at this point in the history
  • Loading branch information
sssvip committed May 24, 2018
1 parent 0d3da21 commit 5f1a4e5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.idea/*
*.exe
/dist/*
/dist/*
*.iml
6 changes: 3 additions & 3 deletions simplefileserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ func entry() {
startEcho = fmt.Sprintf("%s:%s", startEcho, port)
}
log.Println(startEcho)
var optPreAddr = "Optional addr: http://"
var optPreAddr = "Optional addr: "
for _, localIp := range getLocalIPs() {
urlAddr := fmt.Sprintf("%s%s", optPreAddr, localIp)
urlAddr := fmt.Sprintf("http://%s", localIp)
if port != defaultPort {
urlAddr = fmt.Sprintf("%s:%s", urlAddr, port)
}
log.Println(urlAddr)
log.Println(fmt.Sprintf("%s%s",optPreAddr,urlAddr))
if showQRCode {
if showQRCodeIpFilter != qr {
if strings.Contains(urlAddr, strings.Replace(showQRCodeIpFilter, qr, "", -1)) {
Expand Down

0 comments on commit 5f1a4e5

Please sign in to comment.