Skip to content

Commit

Permalink
build: correct the module path (#371)
Browse files Browse the repository at this point in the history
* build: correct the module path

Now we are in v4.x, the `/v4` suffix should be added.

* docs: specify the module version
  • Loading branch information
yin1999 authored Aug 31, 2022
1 parent 1f63737 commit d982b05
Show file tree
Hide file tree
Showing 19 changed files with 49 additions and 35 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ddns-go

[![GitHub release](https://img.shields.io/github/release/jeessy2/ddns-go.svg?logo=github&style=flat-square)](https://github.com/jeessy2/ddns-go/releases/latest) [![](https://goreportcard.com/badge/github.com/jeessy2/ddns-go)](https://goreportcard.com/report/github.com/jeessy2/ddns-go) [![](https://img.shields.io/docker/image-size/jeessy/ddns-go)](https://registry.hub.docker.com/r/jeessy/ddns-go) [![](https://img.shields.io/docker/pulls/jeessy/ddns-go)](https://registry.hub.docker.com/r/jeessy/ddns-go)
[![GitHub release](https://img.shields.io/github/release/jeessy2/ddns-go.svg?logo=github&style=flat-square)](https://github.com/jeessy2/ddns-go/releases/latest) [![](https://goreportcard.com/badge/github.com/jeessy2/ddns-go/v4)](https://goreportcard.com/report/github.com/jeessy2/ddns-go/v4) [![](https://img.shields.io/docker/image-size/jeessy/ddns-go)](https://registry.hub.docker.com/r/jeessy/ddns-go) [![](https://img.shields.io/docker/pulls/jeessy/ddns-go)](https://registry.hub.docker.com/r/jeessy/ddns-go)

自动获得你的公网 IPv4 或 IPv6 地址,并解析到对应的域名服务。

Expand Down
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package config

import (
"ddns-go/util"
"fmt"
"io/ioutil"
"log"
Expand All @@ -10,6 +9,7 @@ import (
"strings"
"sync"

"github.com/jeessy2/ddns-go/v4/util"
"gopkg.in/yaml.v2"
)

Expand Down
3 changes: 2 additions & 1 deletion config/domains.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package config

import (
"ddns-go/util"
"log"
"net/url"
"strings"

"github.com/jeessy2/ddns-go/v4/util"
)

// 固定的主域名
Expand Down
3 changes: 2 additions & 1 deletion config/webhook.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
package config

import (
"ddns-go/util"
"encoding/json"
"fmt"
"log"
"net/http"
"net/url"
"strings"

"github.com/jeessy2/ddns-go/v4/util"
)

// Webhook Webhook
Expand Down
5 changes: 3 additions & 2 deletions dns/alidns.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package dns

import (
"bytes"
"ddns-go/config"
"ddns-go/util"
"log"
"net/http"
"net/url"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions dns/baidu.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package dns

import (
"bytes"
"ddns-go/config"
"ddns-go/util"
"encoding/json"
"log"
"net/http"
"strconv"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
)

// https://cloud.baidu.com/doc/BCD/s/4jwvymhs7
Expand Down
5 changes: 3 additions & 2 deletions dns/callback.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
package dns

import (
"ddns-go/config"
"ddns-go/util"
"encoding/json"
"fmt"
"log"
"net/http"
"net/url"
"strings"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
)

type Callback struct {
Expand Down
5 changes: 3 additions & 2 deletions dns/cloudflare.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package dns

import (
"bytes"
"ddns-go/config"
"ddns-go/util"
"encoding/json"
"fmt"
"log"
"net/http"
"strconv"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions dns/dnspod.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package dns

import (
"ddns-go/config"
"ddns-go/util"
"log"
"net/http"
"net/url"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions dns/huawei.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package dns

import (
"bytes"
"ddns-go/config"
"ddns-go/util"
"encoding/json"
"fmt"
"log"
"net/http"
"strconv"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion dns/index.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package dns

import (
"ddns-go/config"
"log"
"time"

"github.com/jeessy2/ddns-go/v4/config"
)

// DNS interface
Expand Down
5 changes: 3 additions & 2 deletions dns/porkbun.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ package dns

import (
"bytes"
"ddns-go/config"
"ddns-go/util"
"encoding/json"
"fmt"
"log"
"net/http"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
)

const (
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module ddns-go
module github.com/jeessy2/ddns-go/v4

go 1.18

Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
package main

import (
"ddns-go/config"
"ddns-go/dns"
"ddns-go/util"
"ddns-go/web"
"embed"
"flag"
"fmt"
Expand All @@ -17,6 +13,10 @@ import (
"strconv"
"time"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/dns"
"github.com/jeessy2/ddns-go/v4/util"
"github.com/jeessy2/ddns-go/v4/web"
"github.com/kardianos/service"
)

Expand Down
5 changes: 3 additions & 2 deletions web/basic_auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ package web

import (
"bytes"
"ddns-go/config"
"ddns-go/util"
"encoding/base64"
"log"
"net/http"
"strings"
"time"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/util"
)

// ViewFunc func
Expand Down
3 changes: 2 additions & 1 deletion web/netInterfaces.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
package web

import (
"ddns-go/config"
"encoding/json"
"net/http"

"github.com/jeessy2/ddns-go/v4/config"
)

// Ipv4NetInterfaces 获得Ipv4网卡信息
Expand Down
7 changes: 4 additions & 3 deletions web/save.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package web

import (
"ddns-go/config"
"ddns-go/dns"
"ddns-go/util"
"net/http"
"strings"

"github.com/jeessy2/ddns-go/v4/config"
"github.com/jeessy2/ddns-go/v4/dns"
"github.com/jeessy2/ddns-go/v4/util"
)

// Save 保存
Expand Down
3 changes: 2 additions & 1 deletion web/webhookTest.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package web

import (
"ddns-go/config"
"log"
"net/http"
"strings"

"github.com/jeessy2/ddns-go/v4/config"
)

// WebhookTest 测试webhook
Expand Down
8 changes: 4 additions & 4 deletions web/writing.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package web

import (
"ddns-go/config"
"embed"
"os"
"strings"

"fmt"
"html/template"
"net/http"
"os"
"strings"

"github.com/jeessy2/ddns-go/v4/config"
)

//go:embed writing.html
Expand Down

0 comments on commit d982b05

Please sign in to comment.