优化导入

This commit is contained in:
Jason
2025-09-10 10:30:58 +08:00
parent a1e6005cc4
commit 8573196056
17 changed files with 38 additions and 25 deletions

View File

@@ -1,9 +1,10 @@
package calc
import (
"math"
"github.com/PaesslerAG/gval"
"github.com/spf13/cast"
"math"
)
func tarFunc(fun func(x float64) float64) func(x any) float64 {

View File

@@ -1,6 +1,11 @@
package main
import (
"os"
"os/signal"
"syscall"
"time"
_ "github.com/busy-cloud/boat-ui"
_ "github.com/busy-cloud/boat/apis"
_ "github.com/busy-cloud/boat/apps"
@@ -19,10 +24,6 @@ import (
_ "github.com/god-jason/iot-master" //主程序
"github.com/spf13/pflag"
"github.com/spf13/viper"
"os"
"os/signal"
"syscall"
"time"
)
func Startup() error {

4
go.mod
View File

@@ -2,15 +2,13 @@ module github.com/god-jason/iot-master
go 1.24.0
toolchain go1.24.6
require (
github.com/PaesslerAG/gval v1.2.4
github.com/busy-cloud/boat v0.6.19
github.com/busy-cloud/boat-ui v0.5.9
github.com/busy-cloud/dash v0.5.0
github.com/busy-cloud/influxdb v0.5.0
github.com/busy-cloud/modbus v0.5.1
github.com/busy-cloud/modbus v0.5.2
github.com/busy-cloud/saas v0.5.0
github.com/busy-cloud/serial-port v0.5.0
github.com/busy-cloud/tcp-client v0.5.0

4
go.sum
View File

@@ -20,8 +20,8 @@ github.com/busy-cloud/dash v0.5.0 h1:v7onTsSlRKKPN/OHnczyAfPL8+h0pIzrF6FHNh1IJT8
github.com/busy-cloud/dash v0.5.0/go.mod h1:YpLLCh50vwRy47NM9FFrAeg07Mh0qLxz6dzqYPJZm9c=
github.com/busy-cloud/influxdb v0.5.0 h1:4f3MYHOXbc9WQ3pMd4vEz46/iLHBXUrhRlHgxh64q98=
github.com/busy-cloud/influxdb v0.5.0/go.mod h1:qDqN+0fbxovdble0l7+VgbTtvij0W08+rDvigQKGD9c=
github.com/busy-cloud/modbus v0.5.1 h1:pVcDJlsaQ7Yxm0a/10eP85VMx9hmYSnV3azTxLLKRBQ=
github.com/busy-cloud/modbus v0.5.1/go.mod h1:VFGDov4WJpvKQoPalX3A76vcIuQzfIO/IhK51r8VUdY=
github.com/busy-cloud/modbus v0.5.2 h1:RefbKg2X1eMltg8JW+xmAetDeEweWX//B+51+tiyqVQ=
github.com/busy-cloud/modbus v0.5.2/go.mod h1:HgKz0IH+ienGiv/5mTUY8w1LGqVvISopeaXfICLKRKc=
github.com/busy-cloud/saas v0.5.0 h1:bXYw3hIpz6GFxWgWyCcyrC406Hg20/H8M3ree/dT5WY=
github.com/busy-cloud/saas v0.5.0/go.mod h1:R+w5szBS+OSJigv32YuAJZdtDSvX5wLQ/j0/dc7riwM=
github.com/busy-cloud/serial-port v0.5.0 h1:PZ8wSfijbTJoAuYSYPEG3I5lqty4hZanMyCfDO054EI=

View File

@@ -2,10 +2,11 @@ package internal
import (
"fmt"
"strings"
"github.com/busy-cloud/boat/db"
"github.com/busy-cloud/boat/lib"
"github.com/god-jason/iot-master/product"
"strings"
"xorm.io/xorm/schemas"
)

View File

@@ -3,10 +3,11 @@ package internal
import (
"encoding/json"
"fmt"
"strings"
"github.com/busy-cloud/boat/log"
"github.com/busy-cloud/boat/mqtt"
"github.com/god-jason/iot-master/protocol"
"strings"
)
func mqttSubscribeDevice() {

View File

@@ -2,15 +2,16 @@ package internal
import (
"errors"
"math/rand"
"strconv"
"time"
"github.com/busy-cloud/boat/db"
"github.com/busy-cloud/boat/lib"
"github.com/busy-cloud/boat/log"
"github.com/busy-cloud/boat/mqtt"
"github.com/god-jason/iot-master/product"
"github.com/god-jason/iot-master/protocol"
"math/rand"
"strconv"
"time"
)
type Property struct {

View File

@@ -2,6 +2,7 @@ package internal
import (
"errors"
"github.com/busy-cloud/boat/db"
"github.com/busy-cloud/boat/lib"
)

View File

@@ -2,10 +2,11 @@ package internal
import (
"fmt"
"strings"
"github.com/busy-cloud/boat/db"
"github.com/busy-cloud/boat/log"
"github.com/busy-cloud/boat/mqtt"
"strings"
)
func mqttSubscribeLink() {

View File

@@ -2,10 +2,11 @@ package internal
import (
"errors"
"time"
"github.com/busy-cloud/boat/db"
"github.com/busy-cloud/boat/lib"
"github.com/busy-cloud/boat/mqtt"
"time"
)
type Link struct {

View File

@@ -1,9 +1,10 @@
package internal
import (
"net/http"
"github.com/busy-cloud/boat/api"
"github.com/gin-gonic/gin"
"net/http"
)
func init() {

View File

@@ -3,13 +3,14 @@ package internal
import (
"context"
"fmt"
"regexp"
"strings"
"time"
"github.com/PaesslerAG/gval"
"github.com/god-jason/iot-master/calc"
"github.com/god-jason/iot-master/product"
"github.com/spf13/cast"
"regexp"
"strings"
"time"
)
type Validator struct {

View File

@@ -3,6 +3,7 @@ package iot_master
import (
"embed"
"encoding/json"
_ "github.com/busy-cloud/boat-ui"
"github.com/busy-cloud/boat/apps"
"github.com/busy-cloud/boat/log"

View File

@@ -2,6 +2,7 @@ package product
import (
"fmt"
"github.com/spf13/cast"
)

View File

@@ -1,10 +1,11 @@
package protocol
import (
"strings"
"github.com/busy-cloud/boat/log"
"github.com/busy-cloud/boat/mqtt"
"github.com/god-jason/iot-master/product"
"strings"
)
func Create(protocol *Protocol, manager MasterManager) {

View File

@@ -3,6 +3,7 @@ package protocol
import (
"errors"
"fmt"
"github.com/god-jason/iot-master/bin"
"github.com/god-jason/iot-master/product"
"github.com/spf13/cast"

View File

@@ -3,6 +3,10 @@ package main
import (
_ "embed"
"encoding/json"
"os"
"os/signal"
"syscall"
_ "github.com/busy-cloud/boat-ui"
_ "github.com/busy-cloud/boat/apis"
"github.com/busy-cloud/boat/apps"
@@ -22,9 +26,6 @@ import (
_ "github.com/busy-cloud/tcp-server"
_ "github.com/god-jason/iot-master"
"github.com/spf13/viper"
"os"
"os/signal"
"syscall"
)
func init() {