I'm relatively new to golang, although I'm pretty familiar with
Kubernetes. I want to see if I can use client-go as a framework for a set
of scripts that get (or set) information on a specific cluster. I don't
want to use the current context, I want to set the context name on the
command
hen, process the
> 1st parameter
> // Then
> rootCmd.SetArgs(os.Args[2:])
> rootCmd.Execute()
> }
>
> On Sun, Feb 25, 2024 at 1:50 PM David Karr wrote:
> >
> > But where would that be done? I'm not certain of the exact role of the
> "rootCmd.Execute()&quo
ess the first
> parameter yourself.
>
> On Sun, Feb 25, 2024 at 11:43 AM David Karr wrote:
> >
> > I am not a new programmer, but I am pretty new to golang, having only
> written a couple of small applications, and that was several months ago.
> I'm trying to construc
I am not a new programmer, but I am pretty new to golang, having only
written a couple of small applications, and that was several months ago.
I'm trying to construct an application using Cobra, using some nonstandard
conventions. Is it better to ask a question like this in an issue in the
There is nothing new here. Every programming language, framework, and tool
has had the same problem. Quality documentation and training is often the
hardest thing to produce, and is often deemphasized in budgets. It's also
part of the last 10% of doing something that usually takes 90% of the
Ok. I did that. https://github.com/golang/go/issues/51337 .
On Wed, Feb 23, 2022 at 4:20 PM Ian Lance Taylor wrote:
> On Wed, Feb 23, 2022 at 1:46 PM David Karr
> wrote:
> >
> > A while ago, I wrote a small Go app that reads things from zip files. I
> tested it w
A while ago, I wrote a small Go app that reads things from zip files. I
tested it with various zip files (usually Java jar files), and it has
always worked perfectly fine.
Today I'm looking at another jar file. The Java "jar" command likes it
perfectly fine. I could list the contents and
I had earlier written a note about troubles refactoring my project to have
a "src" directory, but I've backed off on that for now. I see that the
main problem I saw with that hasn't changed when backing out those changes.
It appears that running this build inside a docker image seems to be
I had a small go application building successfully. I had the go.mod and
main.go in the root directory of the project, and I was building it pretty
easily with a Makefile, which just did the following:
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -o
target/dist/linux-amd64
I decided I
When I enter "go help build", the first few lines shows this:
usage: go build [-o output] [build flags] [packages]
Build compiles the packages named by the import paths,
The instructions say very little about what can be supplied as "packages".
It says it can be a list of .go files, and
On Saturday, November 27, 2021 at 1:13:12 PM UTC-8 David Karr wrote:
> On Sat, Nov 27, 2021 at 11:57 AM Ian Lance Taylor
> wrote:
>
>> On Sat, Nov 27, 2021 at 11:01 AM David Karr
>> wrote:
>> >
>> > I'm aware of the "build constraints" m
On Sat, Nov 27, 2021 at 11:57 AM Ian Lance Taylor wrote:
> On Sat, Nov 27, 2021 at 11:01 AM David Karr
> wrote:
> >
> > I'm aware of the "build constraints" mechanism, which lets individual
> files be only compiled on specific oses or architectures.
> >
I'm aware of the "build constraints" mechanism, which lets individual files
be only compiled on specific oses or architectures.
I am constructing an app that has a single cgo module, which is the "meat"
of the application (longest module). In my poc, the cgo header specifies a
lib path with
%v\n", f)
> if err != nil {
> fmt.Println("NO FILE")
> //return
>}
>defer f.Close()
> fmt.Println("END")
> }
>
>
> Am Do., 25. Nov. 2021 um 21:43 Uhr schrieb David Karr <
> davidmichaelk...@gmail.com>:
And did you test that with a file path that would fail?
On Thu, Nov 25, 2021, 11:40 Roland Müller wrote:
> Hello,
>
> actually trying this with os.Open() the program behaves the same
> regardless whether the defer is before or after the error handling, Thus,
> no panic :-)
>
> Isn't anything
On Wed, Nov 24, 2021 at 6:14 PM Fannie Zhang wrote:
> Hi all,
>
> There is some incorrect code in
> https://go.dev/blog/defer-panic-and-recover blog.
>
> The original code is
> *func CopyFile() {*
> * ...*
> * if err != nil {*
> * return*
> * }*
> * defer src.Close()*
> * ...*
>
On Monday, November 15, 2021 at 3:49:20 PM UTC-8 David Karr wrote:
>
> I'm pretty new to Go (many years in other languages). I'm trying to use
> cgo to use a C library we're using.
>
> I have the following line of code, which is compiling (that's been enough
> of a struggle)
I'm pretty new to Go (many years in other languages). I'm trying to use
cgo to use a C library we're using.
I have the following line of code, which is compiling (that's been enough
of a struggle):
status = int(C.VeProtect(C.VeObj(fpeProtect), ))
This is failing at runtime with
18 matches
Mail list logo