cobra icon indicating copy to clipboard operation
cobra copied to clipboard

Error: invalid character '{' after top-level value

Open huangxinbo opened this issue 4 years ago • 12 comments

go version go1.18.2 darwin/amd64 GO111MODULE="on"

cobra-cli init 
Error: invalid character '{' after top-level value

huangxinbo avatar May 24 '22 01:05 huangxinbo

Hey, how was this resolved?

Alphacode18 avatar May 27 '22 18:05 Alphacode18

ran into the same issue

kcmvp avatar Jun 11 '22 08:06 kcmvp

same here what the hell is this?

bunnycodego avatar Aug 01 '22 01:08 bunnycodego

+1

fanux avatar Aug 17 '22 03:08 fanux

+1...

ebarti avatar Sep 16 '22 19:09 ebarti

The cobra-cli currently does not support go workspaces. Please see https://github.com/spf13/cobra-cli/issues/26 for details.

marckhouzam avatar Sep 19 '22 02:09 marckhouzam

+1

DarcyNing avatar Apr 23 '23 07:04 DarcyNing

I am also facing the same Issue. Anyone got any kind of solution for that ? Let me know and Help me figure out

Kavyashah26 avatar Aug 15 '23 17:08 Kavyashah26

+1

irkobl avatar Dec 22 '23 16:12 irkobl

+1

fkmatsuda avatar Dec 23 '23 02:12 fkmatsuda

删除或者修改你的go.work文件名 然后重新尝试

NoverLoad avatar Jan 05 '24 14:01 NoverLoad

As @NoverLoad said, deleting your go.work file and running the cobra-cli init command fixes this problem. Cobra seems to not work with go workspaces just yet.

Wixi105 avatar Apr 29 '24 00:04 Wixi105