[go-nuts] Re: go vet configuration? to check variant of printf having to do with verbs
also found this so it is a known limitation: https://github.com/golang/go/issues/44350 On Tuesday, July 26, 2022 at 10:39:06 AM UTC-4 gocss wrote: > Appears 'go vet -printf.funcs loopErrMsgf' > does not detect incorrect verbs or lack thereof on anonymous functions ... > :( > as shown above, which is my desired use case. > > On Tuesday, July 26, 2022 at 10:02:19 AM UTC-4 gocss wrote: > >> Is there a way to configure 'go vet' to a variant of sprintf/printf that >> I rolled >> >> such >> >> loopErrMsgf := func(format string, params ...interface{}) string { >> errCnt++ >> return fmt.Sprintf("[checkIn:loopCnt:%d, errCnt:%d] error >> %s", loopCnt, errCnt, fmt.Sprintf(format, params...)) >> } >> >> that will flag if params does not include correct corresponding printf >> verbs that are >> passed in 'format' ??? above? >> >> If not 'go vet" I used but yet to remember tool I have done this with in >> the past, >> is there another way to do such checks? >> >> -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/38d46d0c-ee7e-45b1-a0c5-02070231ef05n%40googlegroups.com.
[go-nuts] Re: go vet configuration? to check variant of printf having to do with verbs
Appears 'go vet -printf.funcs loopErrMsgf' does not detect incorrect verbs or lack thereof on anonymous functions ... :( as shown above, which is my desired use case. On Tuesday, July 26, 2022 at 10:02:19 AM UTC-4 gocss wrote: > Is there a way to configure 'go vet' to a variant of sprintf/printf that I > rolled > > such > > loopErrMsgf := func(format string, params ...interface{}) string { > errCnt++ > return fmt.Sprintf("[checkIn:loopCnt:%d, errCnt:%d] error > %s", loopCnt, errCnt, fmt.Sprintf(format, params...)) > } > > that will flag if params does not include correct corresponding printf > verbs that are > passed in 'format' ??? above? > > If not 'go vet" I used but yet to remember tool I have done this with in > the past, > is there another way to do such checks? > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/73a1ff0a-98f9-41f1-bf9a-ad7c82e4615cn%40googlegroups.com.
[go-nuts] go vet configuration? to check variant of printf having to do with verbs
Is there a way to configure 'go vet' to a variant of sprintf/printf that I rolled such loopErrMsgf := func(format string, params ...interface{}) string { errCnt++ return fmt.Sprintf("[checkIn:loopCnt:%d, errCnt:%d] error %s", loopCnt, errCnt, fmt.Sprintf(format, params...)) } that will flag if params does not include correct corresponding printf verbs that are passed in 'format' ??? above? If not 'go vet" I used but yet to remember tool I have done this with in the past, is there another way to do such checks? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/5668abf4-c28d-4de1-8b16-210813b8b5cen%40googlegroups.com.
[go-nuts] Is WASM support planned in go 1.12 ?
while webassembly was considered experimental in go 1.11 is it planned in go 1.12 release later this month? If so will it's inclusion be considered non-experimental ? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: go 1.11.4 build issue
what are the needed packages for ubuntu 18.04 to build for android ? On Friday, January 25, 2019 at 3:52:04 PM UTC-5, gocss wrote: > > xubuntu 18.04 LTS > > ./buildall.bash > > 2 areas of concern ... how to resolve? > > #1 ) ### Building linux-riscv64 > go tool compile: exit status 2 > compile: unknown architecture "riscv64" > > #2) /csspc/etc/go/pkg/tool/linux_amd64/link: running gcc failed: exit > status 1 > /tmp/go-link-501389779/go.o:(.data+0x0): undefined reference to > `x_cgo_init' > /tmp/go-link-501389779/go.o:(.data+0x4): undefined reference to > `x_cgo_notify_runtime_init_done' > /tmp/go-link-501389779/go.o:(.data+0x8): undefined reference to > `x_cgo_thread_start' > /tmp/go-link-501389779/go.o:(.data+0x30): undefined reference to > `x_cgo_setenv' > /tmp/go-link-501389779/go.o:(.data+0x34): undefined reference to > `x_cgo_unsetenv' > /tmp/go-link-501389779/go.o:(.data+0x38): undefined reference to > `_cgo_yield' > collect2: error: ld returned 1 exit status > > #2 keeps re-occurring ... I think I missing some package that needs to be > installed > > ** command invocation of ./buildall.bash and output which > I control-c out of follow: > > > GOROOT_BOOTSTRAP=/csspc/etc/go1.11 ./buildall.bash > Building Go cmd/dist using /csspc/etc/go1.11. > Building Go toolchain1 using /csspc/etc/go1.11. > Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1. > Building Go toolchain2 using go_bootstrap and Go toolchain1. > Building Go toolchain3 using go_bootstrap and Go toolchain2. > Building packages and commands for linux/amd64. > --- > Installed Go for linux/amd64 in /csspc/etc/go > Installed commands in /csspc/etc/go/bin > > ### Building linux-386 > > ### Building linux-386-387 > > ### Building linux-amd64 > > ### Building linux-arm > > ### Building linux-arm64 > > ### Building linux-arm-arm5 > > ### Building linux-mips > > ### Building linux-mips64 > > ### Building linux-mips64le > > ### Building linux-mipsle > > ### Building linux-ppc64 > > ### Building linux-ppc64le > > ### Building linux-riscv64 > go tool compile: exit status 2 > compile: unknown architecture "riscv64" > > ### Building linux-s390x > > ### Building nacl-386 > > ### Building nacl-amd64p32 > > ### Building nacl-arm > > ### Building android-386 > # cmd/api > /csspc/etc/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 > /tmp/go-link-501389779/go.o:(.data+0x0): undefined reference to > `x_cgo_init' > /tmp/go-link-501389779/go.o:(.data+0x4): undefined reference to > `x_cgo_notify_runtime_init_done' > /tmp/go-link-501389779/go.o:(.data+0x8): undefined reference to > `x_cgo_thread_start' > /tmp/go-link-501389779/go.o:(.data+0x30): undefined reference to > `x_cgo_setenv' > /tmp/go-link-501389779/go.o:(.data+0x34): undefined reference to > `x_cgo_unsetenv' > /tmp/go-link-501389779/go.o:(.data+0x38): undefined reference to > `_cgo_yield' > collect2: error: ld returned 1 exit status > > # cmd/addr2line > /csspc/etc/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 > /tmp/go-link-715317927/go.o:(.data+0x0): undefined reference to > `x_cgo_init' > /tmp/go-link-715317927/go.o:(.data+0x4): undefined reference to > `x_cgo_notify_runtime_init_done' > /tmp/go-link-715317927/go.o:(.data+0x8): undefined reference to > `x_cgo_thread_start' > /tmp/go-link-715317927/go.o:(.data+0x14): undefined reference to > `x_cgo_setenv' > /tmp/go-link-715317927/go.o:(.data+0x18): undefined reference to > `x_cgo_unsetenv' > /tmp/go-link-715317927/go.o:(.data+0x1c): undefined reference to > `_cgo_yield' > collect2: error: ld returned 1 exit status > > # cmd/buildid > /csspc/etc/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 > /tmp/go-link-384063009/go.o:(.data+0x0): undefined reference to > `x_cgo_init' > /tmp/go-link-384063009/go.o:(.data+0x4): undefined reference to > `x_cgo_notify_runtime_init_done' > /tmp/go-link-384063009/go.o:(.data+0x8): undefined reference to > `x_cgo_thread_start' > /tmp/go-link-384063009/go.o:(.data+0x14): undefined reference to > `x_cgo_setenv' > /tmp/go-link-384063009/go.o:(.data+0x18): undefined reference to > `x_cgo_unsetenv' > /tmp/go-link-384063009/go.o:(.data+0x1c): undefined reference to > `_cgo_yield' > collect2: error: ld returned 1 exit status > > # cmd/cgo > /csspc/etc/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 > /tmp/go-link-418692887/go.o:(.data+0x0): undefined reference to > `x_cgo_init' > /tmp/go-link-418692887/go.o:(.data+0x4): undefined reference to > `x_cgo_notify_runtime_init_d
[go-nuts] go 1.11.4 build issue
xubuntu 18.04 LTS ./buildall.bash 2 areas of concern ... how to resolve? #1 ) ### Building linux-riscv64 go tool compile: exit status 2 compile: unknown architecture "riscv64" #2) /csspc/etc/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /tmp/go-link-501389779/go.o:(.data+0x0): undefined reference to `x_cgo_init' /tmp/go-link-501389779/go.o:(.data+0x4): undefined reference to `x_cgo_notify_runtime_init_done' /tmp/go-link-501389779/go.o:(.data+0x8): undefined reference to `x_cgo_thread_start' /tmp/go-link-501389779/go.o:(.data+0x30): undefined reference to `x_cgo_setenv' /tmp/go-link-501389779/go.o:(.data+0x34): undefined reference to `x_cgo_unsetenv' /tmp/go-link-501389779/go.o:(.data+0x38): undefined reference to `_cgo_yield' collect2: error: ld returned 1 exit status #2 keeps re-occurring ... I think I missing some package that needs to be installed ** command invocation of ./buildall.bash and output which I control-c out of follow: GOROOT_BOOTSTRAP=/csspc/etc/go1.11 ./buildall.bash Building Go cmd/dist using /csspc/etc/go1.11. Building Go toolchain1 using /csspc/etc/go1.11. Building Go bootstrap cmd/go (go_bootstrap) using Go toolchain1. Building Go toolchain2 using go_bootstrap and Go toolchain1. Building Go toolchain3 using go_bootstrap and Go toolchain2. Building packages and commands for linux/amd64. --- Installed Go for linux/amd64 in /csspc/etc/go Installed commands in /csspc/etc/go/bin ### Building linux-386 ### Building linux-386-387 ### Building linux-amd64 ### Building linux-arm ### Building linux-arm64 ### Building linux-arm-arm5 ### Building linux-mips ### Building linux-mips64 ### Building linux-mips64le ### Building linux-mipsle ### Building linux-ppc64 ### Building linux-ppc64le ### Building linux-riscv64 go tool compile: exit status 2 compile: unknown architecture "riscv64" ### Building linux-s390x ### Building nacl-386 ### Building nacl-amd64p32 ### Building nacl-arm ### Building android-386 # cmd/api /csspc/etc/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /tmp/go-link-501389779/go.o:(.data+0x0): undefined reference to `x_cgo_init' /tmp/go-link-501389779/go.o:(.data+0x4): undefined reference to `x_cgo_notify_runtime_init_done' /tmp/go-link-501389779/go.o:(.data+0x8): undefined reference to `x_cgo_thread_start' /tmp/go-link-501389779/go.o:(.data+0x30): undefined reference to `x_cgo_setenv' /tmp/go-link-501389779/go.o:(.data+0x34): undefined reference to `x_cgo_unsetenv' /tmp/go-link-501389779/go.o:(.data+0x38): undefined reference to `_cgo_yield' collect2: error: ld returned 1 exit status # cmd/addr2line /csspc/etc/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /tmp/go-link-715317927/go.o:(.data+0x0): undefined reference to `x_cgo_init' /tmp/go-link-715317927/go.o:(.data+0x4): undefined reference to `x_cgo_notify_runtime_init_done' /tmp/go-link-715317927/go.o:(.data+0x8): undefined reference to `x_cgo_thread_start' /tmp/go-link-715317927/go.o:(.data+0x14): undefined reference to `x_cgo_setenv' /tmp/go-link-715317927/go.o:(.data+0x18): undefined reference to `x_cgo_unsetenv' /tmp/go-link-715317927/go.o:(.data+0x1c): undefined reference to `_cgo_yield' collect2: error: ld returned 1 exit status # cmd/buildid /csspc/etc/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /tmp/go-link-384063009/go.o:(.data+0x0): undefined reference to `x_cgo_init' /tmp/go-link-384063009/go.o:(.data+0x4): undefined reference to `x_cgo_notify_runtime_init_done' /tmp/go-link-384063009/go.o:(.data+0x8): undefined reference to `x_cgo_thread_start' /tmp/go-link-384063009/go.o:(.data+0x14): undefined reference to `x_cgo_setenv' /tmp/go-link-384063009/go.o:(.data+0x18): undefined reference to `x_cgo_unsetenv' /tmp/go-link-384063009/go.o:(.data+0x1c): undefined reference to `_cgo_yield' collect2: error: ld returned 1 exit status # cmd/cgo /csspc/etc/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /tmp/go-link-418692887/go.o:(.data+0x0): undefined reference to `x_cgo_init' /tmp/go-link-418692887/go.o:(.data+0x4): undefined reference to `x_cgo_notify_runtime_init_done' /tmp/go-link-418692887/go.o:(.data+0x8): undefined reference to `x_cgo_thread_start' /tmp/go-link-418692887/go.o:(.data+0x1c): undefined reference to `x_cgo_setenv' /tmp/go-link-418692887/go.o:(.data+0x20): undefined reference to `x_cgo_unsetenv' /tmp/go-link-418692887/go.o:(.data+0x24): undefined reference to `_cgo_yield' collect2: error: ld returned 1 exit status # cmd/asm /csspc/etc/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1 /tmp/go-link-565067417/go.o:(.data+0x0): undefined reference to `x_cgo_init' /tmp/go-link-565067417/go.o:(.data+0x4): undefined reference to `x_cgo_notify_runtime_init_done' /tmp/go-link-565067417/go.o:(.data+0x8): undefined reference to `x_cgo_thread_start' /tmp/go-link-565067417/go.o:(.data+0x4c): undefined reference to `x_cgo_setenv'
[go-nuts] go test/flag.NewFlagSet bug?
when I run the minimal program below it errors about NOT knowing -data flag: go test -v -args -data=x flag provided but not defined: -data Usage of /tmp/go-build454762170/github.com/phcurtis/flagexp/_test/flagexp.test: -test.bench regexp blah blah, if you change nfs=false ... and then it uses flag.Parse etc ... code runs without issue but I want to handle error cases in other code I'm working and use the flag.NewFlagSet with go test ... note the below code in either case works with go run but not with go test. package main import ( "flag" "fmt" "os" "testing" ) var data string var test func(t *testing.T) var datainit = "defValue" var nfs = true func init() { if nfs { flag3 := flag.NewFlagSet("nfs", flag.ContinueOnError) flag3.StringVar(, "data", datainit, "data") test = func(t *testing.T) { fmt.Println("TP1") err := flag3.Parse(os.Args) fmt.Printf("data:%v err:%v\n", data, err) } return } flag.StringVar(, "data", datainit, "data") test = func(t *testing.T) { fmt.Println("TP2") flag.Parse() fmt.Printf("data:%v\n", data) } } func Test_code(t *testing.T) { test(t) } *** heres full output when nfs=true paul@t560:~/go/src/github.com/phcurtis/flagexp$ go test -v -args -data=x flag provided but not defined: -data Usage of /tmp/go-build454762170/github.com/phcurtis/flagexp/_test/flagexp.test: -test.bench regexp run only benchmarks matching regexp -test.benchmem print memory allocations for benchmarks -test.benchtime d run each benchmark for duration d (default 1s) -test.blockprofile file write a goroutine blocking profile to file -test.blockprofilerate rate set blocking profile rate (see runtime.SetBlockProfileRate) (default 1) -test.count n run tests and benchmarks n times (default 1) -test.coverprofile file write a coverage profile to file -test.cpu list comma-separated list of cpu counts to run each test with -test.cpuprofile file write a cpu profile to file -test.list regexp list tests, examples, and benchmarch maching regexp then exit -test.memprofile file write a memory profile to file -test.memprofilerate rate set memory profiling rate (see runtime.MemProfileRate) -test.mutexprofile string write a mutex contention profile to the named file after execution -test.mutexprofilefraction int if >= 0, calls runtime.SetMutexProfileFraction() (default 1) -test.outputdir dir write profiles to dir -test.parallel n run at most n tests in parallel (default 4) -test.run regexp run only tests and examples matching regexp -test.short run smaller test suite to save time -test.timeout d panic test binary after duration d (0 means unlimited) -test.trace file write an execution trace to file -test.v verbose: print additional output exit status 2 FAILgithub.com/phcurtis/flagexp0.001s -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] sanitize filename from post form upload
Is there go code to sanitize a filename [or filename(s) if ] when the handler is processing them so as to detect things such as ../ that might be buried within them ? Also is there a way to find out the full pathname? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: building go1.7.5 ... api check failed
yes; after the failed api check I issued 4 commands: "go env" "env | grep GO" "which go" "go -version" output of those follow: admin1@tp13:/csspc/etc$ go env GOARCH="amd64" GOBIN="" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/mnt/data1/admin1/gocode" GORACE="" GOROOT="/csspc/etc/go" GOTOOLDIR="/csspc/etc/go/pkg/tool/linux_amd64" CC="gcc" GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build874482102=/tmp/go-build -gno-record-gcc-switches" CXX="g++" CGO_ENABLED="1" admin1@tp13:/csspc/etc$ admin1@tp13:/csspc/etc/go$ env | grep GO GOROOT_BOOTSTRAP=/csspc/etc/go.old GOROOT=/csspc/etc/go GOPATH=/mnt/data1/admin1/gocode admin1@tp13:/csspc/etc/go$ admin1@tp13:/csspc/etc$ which go /csspc/etc/go/bin/go admin1@tp13:/csspc/etc$ admin1@tp13:/csspc/etc$ go version go version go1.7.5 linux/amd64 admin1@tp13:/csspc/etc$ On Saturday, January 28, 2017 at 11:06:18 AM UTC-5, gocss wrote: > > building in xubuntu 16.04 LTS > > # API check > stat /csspc/etc/go/src/cmd/api/run.go: no such file or directory > 2017/01/28 10:51:46 Failed: exit status 1 > 2017/01/28 10:51:46 FAILED > > doing an ls of above directory: > admin1@tp13:/csspc/etc/go/src$ ls /csspc/etc/go/src/cmd/api > ls: cannot access '/csspc/etc/go/src/cmd/api': No such file or directory > admin1@tp13:/csspc/etc/go/src$ > > I do find an api directory elsewhere > admin1@tp13:/csspc/etc/go/api$ ls > except.txt go1.2.txt go1.4.txt go1.6.txt go1.txt README > go1.1.txt go1.3.txt go1.5.txt go1.7.txt next.txt > admin1@tp13:/csspc/etc/go/api$ > > *Is this a known issue ... I get this error also building on another > machine ???* > here is full output of the build: > admin1@tp13:/csspc/etc/go/src$ time ./all.bash > # Building Go bootstrap tool. > cmd/dist > > # Building Go toolchain using /csspc/etc/go.old. > bootstrap/internal/sys > bootstrap/asm/internal/flags > bootstrap/internal/bio > bootstrap/compile/internal/big > bootstrap/internal/gcprog > bootstrap/internal/obj > bootstrap/internal/obj/arm > bootstrap/internal/obj/arm64 > bootstrap/internal/obj/mips > bootstrap/internal/obj/ppc64 > bootstrap/internal/obj/s390x > bootstrap/internal/obj/x86 > bootstrap/asm/internal/lex > bootstrap/link/internal/ld > bootstrap/asm/internal/arch > bootstrap/compile/internal/ssa > bootstrap/asm/internal/asm > bootstrap/asm > bootstrap/link/internal/amd64 > bootstrap/link/internal/arm > bootstrap/link/internal/arm64 > bootstrap/link/internal/mips64 > bootstrap/link/internal/ppc64 > bootstrap/link/internal/s390x > bootstrap/link/internal/x86 > bootstrap/link > bootstrap/compile/internal/gc > bootstrap/compile/internal/arm > bootstrap/compile/internal/amd64 > bootstrap/compile/internal/arm64 > bootstrap/compile/internal/ppc64 > bootstrap/compile/internal/mips64 > bootstrap/compile/internal/s390x > bootstrap/compile/internal/x86 > bootstrap/compile > > # Building go_bootstrap for host, linux/amd64. > runtime/internal/sys > runtime/internal/atomic > runtime > sync/atomic > unicode/utf16 > internal/race > sort > errors > internal/syscall/windows/sysdll > unicode > math > unicode/utf8 > encoding > sync > syscall > internal/singleflight > io > container/heap > hash > hash/adler32 > strconv > bytes > strings > bufio > path > crypto > reflect > encoding/base64 > regexp/syntax > crypto/sha1 > internal/syscall/windows > internal/syscall/windows/registry > time > regexp > os > os/signal > path/filepath > encoding/binary > fmt > io/ioutil > go/token > compress/flate > net/url > debug/dwarf > encoding/json > text/template/parse > flag > log > context > os/exec > go/scanner > go/ast > compress/zlib > text/template > debug/macho > debug/elf > go/parser > go/doc > go/build > cmd/go > > # Building packages and commands for linux/amd64. > runtime/internal/sys > runtime/internal/atomic > runtime > internal/race > errors > sync/atomic > unicode > math > unicode/utf8 > sort > container/list > sync > container/ring > crypto/subtle > container/heap > io > syscall > internal/nettrace > internal/singleflight > encoding > unicode/utf16 > image/color > internal/syscall/windows/sysdll > hash > hash/adler32 > hash/crc32 > crypto/cipher > crypto/hmac > hash/crc64 > hash/fnv > image/color/palette > runtime/trace > bytes > strings > runtime/race > cmd/compile/in
[go-nuts] building go1.7.5 ... api check failed
building in xubuntu 16.04 LTS # API check stat /csspc/etc/go/src/cmd/api/run.go: no such file or directory 2017/01/28 10:51:46 Failed: exit status 1 2017/01/28 10:51:46 FAILED doing an ls of above directory: admin1@tp13:/csspc/etc/go/src$ ls /csspc/etc/go/src/cmd/api ls: cannot access '/csspc/etc/go/src/cmd/api': No such file or directory admin1@tp13:/csspc/etc/go/src$ I do find an api directory elsewhere admin1@tp13:/csspc/etc/go/api$ ls except.txt go1.2.txt go1.4.txt go1.6.txt go1.txt README go1.1.txt go1.3.txt go1.5.txt go1.7.txt next.txt admin1@tp13:/csspc/etc/go/api$ *Is this a known issue ... I get this error also building on another machine ???* here is full output of the build: admin1@tp13:/csspc/etc/go/src$ time ./all.bash # Building Go bootstrap tool. cmd/dist # Building Go toolchain using /csspc/etc/go.old. bootstrap/internal/sys bootstrap/asm/internal/flags bootstrap/internal/bio bootstrap/compile/internal/big bootstrap/internal/gcprog bootstrap/internal/obj bootstrap/internal/obj/arm bootstrap/internal/obj/arm64 bootstrap/internal/obj/mips bootstrap/internal/obj/ppc64 bootstrap/internal/obj/s390x bootstrap/internal/obj/x86 bootstrap/asm/internal/lex bootstrap/link/internal/ld bootstrap/asm/internal/arch bootstrap/compile/internal/ssa bootstrap/asm/internal/asm bootstrap/asm bootstrap/link/internal/amd64 bootstrap/link/internal/arm bootstrap/link/internal/arm64 bootstrap/link/internal/mips64 bootstrap/link/internal/ppc64 bootstrap/link/internal/s390x bootstrap/link/internal/x86 bootstrap/link bootstrap/compile/internal/gc bootstrap/compile/internal/arm bootstrap/compile/internal/amd64 bootstrap/compile/internal/arm64 bootstrap/compile/internal/ppc64 bootstrap/compile/internal/mips64 bootstrap/compile/internal/s390x bootstrap/compile/internal/x86 bootstrap/compile # Building go_bootstrap for host, linux/amd64. runtime/internal/sys runtime/internal/atomic runtime sync/atomic unicode/utf16 internal/race sort errors internal/syscall/windows/sysdll unicode math unicode/utf8 encoding sync syscall internal/singleflight io container/heap hash hash/adler32 strconv bytes strings bufio path crypto reflect encoding/base64 regexp/syntax crypto/sha1 internal/syscall/windows internal/syscall/windows/registry time regexp os os/signal path/filepath encoding/binary fmt io/ioutil go/token compress/flate net/url debug/dwarf encoding/json text/template/parse flag log context os/exec go/scanner go/ast compress/zlib text/template debug/macho debug/elf go/parser go/doc go/build cmd/go # Building packages and commands for linux/amd64. runtime/internal/sys runtime/internal/atomic runtime internal/race errors sync/atomic unicode math unicode/utf8 sort container/list sync container/ring crypto/subtle container/heap io syscall internal/nettrace internal/singleflight encoding unicode/utf16 image/color internal/syscall/windows/sysdll hash hash/adler32 hash/crc32 crypto/cipher crypto/hmac hash/crc64 hash/fnv image/color/palette runtime/trace bytes strings runtime/race cmd/compile/internal/test cmd/vet/internal/whitelist strconv math/rand bufio path text/tabwriter vendor/golang_org/x/net/lex/httplex html math/cmplx compress/bzip2 reflect regexp/syntax crypto crypto/aes time crypto/sha512 crypto/md5 internal/syscall/unix crypto/rc4 crypto/sha1 crypto/sha256 encoding/base64 encoding/ascii85 encoding/base32 image encoding/pem regexp os image/internal/imageutil image/jpeg image/draw path/filepath runtime/debug os/signal cmd/internal/pprof/svg io/ioutil encoding/binary fmt cmd/internal/sys crypto/des index/suffixarray flag log debug/dwarf compress/flate debug/gosym debug/plan9obj cmd/vendor/golang.org/x/arch/arm/armasm cmd/vendor/golang.org/x/arch/x86/x86asm archive/tar cmd/internal/obj compress/zlib debug/macho debug/pe debug/elf archive/zip compress/gzip cmd/internal/goobj compress/lzw context math/big encoding/hex go/token os/exec database/sql/driver go/scanner encoding/csv cmd/internal/objfile database/sql go/ast encoding/gob encoding/json cmd/addr2line encoding/xml go/parser crypto/dsa crypto/elliptic encoding/asn1 crypto/rand go/printer crypto/rsa vendor/golang_org/x/net/http2/hpack crypto/ecdsa crypto/x509/pkix mime mime/quotedprintable net/http/internal net/url text/template/parse go/constant text/scanner image/gif image/png runtime/pprof cmd/cgo go/format testing go/types internal/trace net/internal/socktest text/template testing/iotest internal/testenv testing/quick cmd/internal/obj/arm cmd/internal/obj/arm64 cmd/internal/obj/mips go/doc html/template cmd/internal/obj/ppc64 go/build cmd/internal/obj/s390x cmd/internal/obj/x86 cmd/asm/internal/flags cmd/asm/internal/lex runtime/cgo cmd/internal/bio go/internal/gccgoimporter go/internal/gcimporter cmd/compile/internal/big cmd/internal/gcprog cmd/compile/internal/ssa cmd/cover go/importer cmd/dist net os/user cmd/asm/internal/arch cmd/doc cmd/asm/internal/asm cmd/fix cmd/asm cmd/gofmt cmd/internal/pprof/profile
[go-nuts] C references to Go functions
I want to call a go function from c. I have file main.go: package main import "fmt" import "C" //export MyFunction func MyFunction(arg1 int) int64 { fmt.Println("GO:MyFunction", "arg1=", arg1) return 1 } func main() { fmt.Println("GO:main") } I build this with: go build -buildmode=c-archive main.go c file call.c: #include #include "main.h" void main() { printf("C:main %s\n", "pc"); MyFunction(1); } gcc call.c -L./main.a /tmp/ccNCGKAS.o: In function `main': call.c:(.text+0x1e): undefined reference to `MyFunction' collect2: error: ld returned 1 exit status MyFunction is found in main.a archive nm main.a | grep MyFunction T _cgoexp_ca787091a83e_MyFunction 0060 t main._cgoexpwrap_ca787091a83e_MyFunction 00032660 r main._cgoexpwrap_ca787091a83e_MyFunction.f 00b0 t main.MyFunction U _cgoexp_ca787091a83e_MyFunction T MyFunction How do I resolve this ? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: go1.7.4 API check Fail
I applied latest updates to ubuntu 14.04 LTS but end with this error: (below) I also see https://github.com/golang/go/issues/18064 ... so I take it I can ignore TestLoadFixed Fail the thing that concerns me is that I don't see any Check API in the output from ./all.bash after running ./clean.bash comments? ok text/template/parse0.007s --- FAIL: TestLoadFixed (0.00s) time_test.go:943: Now().In(loc).Zone() = "-01", -3600, want "GMT+1", -3600 FAIL FAILtime2.438s ok unicode0.007s ok unicode/utf160.009s ok unicode/utf80.006s ok vendor/golang_org/x/net/http2/hpack0.007s ok vendor/golang_org/x/net/lex/httplex0.006s ok cmd/addr2line0.678s ok cmd/asm/internal/asm0.236s ok cmd/asm/internal/lex0.010s ok cmd/compile/internal/big0.893s ok cmd/compile/internal/gc13.667s ok cmd/compile/internal/ssa0.320s ok cmd/compile/internal/test0.020s ok cmd/cover1.368s ok cmd/doc0.037s ok cmd/fix0.020s ok cmd/go37.467s ok cmd/gofmt0.042s ok cmd/internal/goobj0.020s ok cmd/internal/obj0.003s ok cmd/internal/obj/x860.015s ok cmd/internal/pprof/profile0.005s ok cmd/link0.015s ok cmd/nm0.787s ok cmd/objdump2.214s ok cmd/pack2.101s ok cmd/vendor/golang.org/x/arch/arm/armasm0.023s ok cmd/vendor/golang.org/x/arch/x86/x86asm0.263s ok cmd/vet2.795s ok cmd/vet/internal/cfg0.005s 2016/12/02 12:24:28 Failed: exit status 1 root@csspc-base:/csspc/etc/go/src# On Friday, December 2, 2016 at 11:04:12 AM UTC-5, gocss wrote: > > during ./all.bash > # ../test > > # API check > stat /csspc/etc/go/src/cmd/api/run.go: no such file or directory > 2016/12/02 10:38:43 Failed: exit status 1 > 2016/12/02 10:38:43 FAILED > root@csspc-base:/csspc/etc/go/src# > > is this a known issue? > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] go1.7.4 API check Fail
during ./all.bash # ../test # API check stat /csspc/etc/go/src/cmd/api/run.go: no such file or directory 2016/12/02 10:38:43 Failed: exit status 1 2016/12/02 10:38:43 FAILED root@csspc-base:/csspc/etc/go/src# is this a known issue? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.