Saturday, July 25, 2020

Copy beego codes from one machine to another

As my previous post, just solved the beego installation issue.

Now, I can start "bee" command.

d:\dvp\go\src\bookstore>bee run
______
| ___ \
| |_/ /  ___   ___
| ___ \ / _ \ / _ \
| |_/ /|  __/|  __/
\____/  \___| \___| v1.11.0
2020/07/25 13:01:48 WARN     ▶ 0001 Running application outside of GOPATH
2020/07/25 13:01:48 INFO     ▶ 0002 Using 'bookstore' as 'appname'
2020/07/25 13:01:48 INFO     ▶ 0003 Initializing watcher...
go: cannot find main module; see 'go help modules'
2020/07/25 13:01:48 ERROR    ▶ 0004 Failed to build the application: go: cannot find main module; see 'go help modules'

go: cannot find main module; see 'go help modules'
2020/07/25 13:01:49 ERROR    ▶ 0005 Failed to build the application: go: cannot find main module; see 'go help modules'


In the start up logs, I still suffer the errors.

As another duck solution, I try:

d:\dvp\go\src\bookstore>go mod init bookstore
go: creating new go.mod: module bookstore

Another try :

d:\dvp\go\src\bookstore>bee run
______
| ___ \
| |_/ /  ___   ___
| ___ \ / _ \ / _ \
| |_/ /|  __/|  __/
\____/  \___| \___| v1.11.0
2020/07/25 13:07:07 WARN     ▶ 0001 Running application outside of GOPATH
2020/07/25 13:07:07 INFO     ▶ 0002 Using 'bookstore' as 'appname'
2020/07/25 13:07:07 INFO     ▶ 0003 Initializing watcher...
go: finding module for package github.com/mattn/go-sqlite3
go: finding module for package github.com/astaxie/beego/orm
go: finding module for package github.com/astaxie/beego
go: downloading github.com/mattn/go-sqlite3 v1.14.0
go: downloading github.com/astaxie/beego v1.12.2
go: found github.com/astaxie/beego in github.com/astaxie/beego v1.12.2
go: found github.com/mattn/go-sqlite3 in github.com/mattn/go-sqlite3 v1.14.0
go: downloading github.com/mattn/go-sqlite3 v2.0.3+incompatible
go: downloading github.com/prometheus/client_golang v1.7.0
go: downloading gopkg.in/yaml.v2 v2.2.8
go: downloading golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550
go: downloading github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644
go: downloading github.com/prometheus/client_model v0.2.0
go: downloading github.com/prometheus/common v0.10.0
go: downloading github.com/cespare/xxhash/v2 v2.1.1
go: downloading golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1
go: downloading github.com/golang/protobuf v1.4.2
go: downloading github.com/beorn7/perks v1.0.1
go: downloading google.golang.org/protobuf v1.23.0
go: downloading golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e
go: downloading github.com/matttproud/golang_protobuf_extensions v1.0.1
go: downloading golang.org/x/text v0.3.0
google.golang.org/protobuf/internal/flags
google.golang.org/protobuf/internal/fieldnum
google.golang.org/protobuf/internal/set
github.com/hashicorp/golang-lru
github.com/astaxie/beego/config
github.com/astaxie/beego/utils
gopkg.in/yaml.v2
github.com/astaxie/beego/orm
github.com/shiena/ansicolor
github.com/astaxie/beego/session
github.com/astaxie/beego/logs
github.com/astaxie/beego/grace
github.com/astaxie/beego/context
github.com/astaxie/beego/toolbox
github.com/beorn7/perks/quantile
bookstore/models
github.com/astaxie/beego/context/param
github.com/cespare/xxhash/v2
google.golang.org/protobuf/internal/detrand
google.golang.org/protobuf/internal/pragma
google.golang.org/protobuf/internal/errors
google.golang.org/protobuf/internal/genname
google.golang.org/protobuf/internal/version
github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg
google.golang.org/protobuf/encoding/protowire
github.com/prometheus/common/model
golang.org/x/sys/internal/unsafeheader
golang.org/x/crypto/acme
google.golang.org/protobuf/reflect/protoreflect
golang.org/x/sys/windows
golang.org/x/text/transform
google.golang.org/protobuf/reflect/protoregistry
google.golang.org/protobuf/internal/strs
google.golang.org/protobuf/internal/mapsort
google.golang.org/protobuf/internal/encoding/messageset
google.golang.org/protobuf/internal/encoding/text
google.golang.org/protobuf/internal/fieldsort
google.golang.org/protobuf/runtime/protoiface
google.golang.org/protobuf/internal/descfmt
google.golang.org/protobuf/internal/descopts
google.golang.org/protobuf/internal/encoding/defval
google.golang.org/protobuf/proto
golang.org/x/text/unicode/bidi
golang.org/x/text/unicode/norm
golang.org/x/text/secure/bidirule
google.golang.org/protobuf/encoding/prototext
google.golang.org/protobuf/internal/filedesc
github.com/mattn/go-sqlite3
golang.org/x/net/idna
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%
google.golang.org/protobuf/internal/encoding/tag
golang.org/x/crypto/acme/autocert
google.golang.org/protobuf/internal/impl
google.golang.org/protobuf/internal/filetype
google.golang.org/protobuf/runtime/protoimpl
google.golang.org/protobuf/types/known/anypb
google.golang.org/protobuf/types/known/durationpb
google.golang.org/protobuf/types/known/timestamppb
github.com/golang/protobuf/proto
github.com/golang/protobuf/ptypes/duration
github.com/golang/protobuf/ptypes/any
github.com/golang/protobuf/ptypes/timestamp
github.com/matttproud/golang_protobuf_extensions/pbutil
github.com/prometheus/client_model/go
github.com/golang/protobuf/ptypes
github.com/prometheus/client_golang/prometheus/internal
github.com/prometheus/common/expfmt
github.com/prometheus/client_golang/prometheus
github.com/prometheus/client_golang/prometheus/promhttp
github.com/astaxie/beego
bookstore/controllers
# bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
2020/07/25 13:08:08 ERROR    ▶ 0004 Failed to build the application: # github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%
# bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used

bookstore/controllers
github.com/mattn/go-sqlite3
# bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%
2020/07/25 13:08:09 ERROR    ▶ 0005 Failed to build the application: # bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%

bookstore/controllers
github.com/mattn/go-sqlite3
# bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%
2020/07/25 13:08:10 ERROR    ▶ 0006 Failed to build the application: # bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%

bookstore/controllers
github.com/mattn/go-sqlite3
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%
# bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
2020/07/25 13:08:11 ERROR    ▶ 0007 Failed to build the application: # bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%

bookstore/controllers
github.com/mattn/go-sqlite3
# bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%
2020/07/25 13:08:12 ERROR    ▶ 0008 Failed to build the application: # bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%

bookstore/controllers
github.com/mattn/go-sqlite3
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%
# bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
2020/07/25 13:08:13 ERROR    ▶ 0009 Failed to build the application: # bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%

bookstore/controllers
github.com/mattn/go-sqlite3
# bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%
2020/07/25 13:08:14 ERROR    ▶ 0010 Failed to build the application: # bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%

bookstore/controllers
github.com/mattn/go-sqlite3
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%
# bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
2020/07/25 13:08:15 ERROR    ▶ 0011 Failed to build the application: # bookstore/controllers
controllers\book.go:65:2: categoryID declared but not used
controllers\book.go:66:2: publisherID declared but not used
controllers\book.go:67:2: authorID declared but not used
# github.com/mattn/go-sqlite3
exec: "gcc": executable file not found in %PATH%

Still missing gcc. Some of go codes, may include c codes.

Download tdm-gcc and install.



No comments: