From 5d38d83d6d70b891cbdb597d95db9d8fa0ed1a14 Mon Sep 17 00:00:00 2001 From: 502647092 Date: Fri, 9 Nov 2018 09:19:00 +0800 Subject: [PATCH] use go module --- .gitignore | 1 + Gopkg.lock | 17 ----------------- Gopkg.toml | 34 ---------------------------------- go.mod | 6 ++++++ go.sum | 4 ++++ main.go | 1 + 6 files changed, 12 insertions(+), 51 deletions(-) delete mode 100644 Gopkg.lock delete mode 100644 Gopkg.toml create mode 100644 go.mod create mode 100644 go.sum diff --git a/.gitignore b/.gitignore index 447db7a..e48a4bb 100644 --- a/.gitignore +++ b/.gitignore @@ -28,3 +28,4 @@ _testmain.go debug *.exe clipboard-sync +*.log diff --git a/Gopkg.lock b/Gopkg.lock deleted file mode 100644 index 464b1f7..0000000 --- a/Gopkg.lock +++ /dev/null @@ -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 diff --git a/Gopkg.toml b/Gopkg.toml deleted file mode 100644 index 7ca4460..0000000 --- a/Gopkg.toml +++ /dev/null @@ -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 diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..8245fe4 --- /dev/null +++ b/go.mod @@ -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 +) diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..d0d4a33 --- /dev/null +++ b/go.sum @@ -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= diff --git a/main.go b/main.go index 4862d12..bb2f57f 100644 --- a/main.go +++ b/main.go @@ -71,6 +71,7 @@ func syncClipboard(a string) { response, err := http.Get(a) if err != nil { time.Sleep(1000 * time.Millisecond) + fmt.Printf("Http Request Error: %s\n", err.Error()) continue } texts, ok := response.Header[textHeader]