1
0

use go module

This commit is contained in:
502647092 2018-11-09 09:19:00 +08:00
parent 9b4497245e
commit 5d38d83d6d
6 changed files with 12 additions and 51 deletions

1
.gitignore vendored
View File

@ -28,3 +28,4 @@ _testmain.go
debug debug
*.exe *.exe
clipboard-sync clipboard-sync
*.log

17
Gopkg.lock generated
View File

@ -1,17 +0,0 @@
# This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'.
[[projects]]
branch = "master"
digest = "1:256554af8321e28c57fab65ec53c3497d6e5d03c8b9eab1530875530030b68ef"
name = "github.com/lxn/win"
packages = ["."]
pruneopts = "UT"
revision = "785c4956069227e430929ac27bfa26af2ff25dfb"
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
input-imports = ["github.com/lxn/win"]
solver-name = "gps-cdcl"
solver-version = 1

View File

@ -1,34 +0,0 @@
# Gopkg.toml example
#
# Refer to https://golang.github.io/dep/docs/Gopkg.toml.html
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true
[[constraint]]
branch = "master"
name = "github.com/lxn/win"
[prune]
go-tests = true
unused-packages = true

6
go.mod Normal file
View File

@ -0,0 +1,6 @@
module clipboard-sync
require (
github.com/lxn/win v0.0.0-20180821075459-785c49560692
yumc.pw/cloud/clipboard-sync v0.0.0-20181029103722-a7c2dd048e59
)

4
go.sum Normal file
View File

@ -0,0 +1,4 @@
github.com/lxn/win v0.0.0-20180821075459-785c49560692 h1:NHaLxZM64QLmURkPKVz+LUFa1O15iiym8bsPwHXZ7Mg=
github.com/lxn/win v0.0.0-20180821075459-785c49560692/go.mod h1:jACzEp9RV7NhfPJQkiCNTteU4nkZZVlvkNpYtVOZPfE=
yumc.pw/cloud/clipboard-sync v0.0.0-20181029103722-a7c2dd048e59 h1:o2pbZZiZxQ4Fk0j8snK2raOvAvusVEk8/Z26Ai0ojII=
yumc.pw/cloud/clipboard-sync v0.0.0-20181029103722-a7c2dd048e59/go.mod h1:pYhdf1rTe2aLs83iOW09oB7G24WDeH9XqPzqnoCMXlc=

View File

@ -71,6 +71,7 @@ func syncClipboard(a string) {
response, err := http.Get(a) response, err := http.Get(a)
if err != nil { if err != nil {
time.Sleep(1000 * time.Millisecond) time.Sleep(1000 * time.Millisecond)
fmt.Printf("Http Request Error: %s\n", err.Error())
continue continue
} }
texts, ok := response.Header[textHeader] texts, ok := response.Header[textHeader]