The type secretservice.replaceBehavior is not exported, though constants secretservice.ReplaceBehaviorDoNotReplace and secretservice.ReplaceBehaviorReplace are.
This may be a golang newbie problem, but this appears to prevent the use of the flag as a variable, e.g.
as the type of replaceFlag to decay to int, resulting in error
cannot use replaceFlag (type int) as type secretservice.replaceBehavior in argument to srv.CreateItem
If the initialization of replaceFlag is explicitly typed secretservice.replaceBehavior then the build will fail with cannot refer to unexported name secretservice.replaceBehavior. Same if an explicit cast is used when passing the argument.
Unless this is me being a golang ignoramus, it seems like secretservice.replaceBehavior should be exported as secretservice.ReplaceBehavior instead.
The type
secretservice.replaceBehavior
is not exported, though constantssecretservice.ReplaceBehaviorDoNotReplace
andsecretservice.ReplaceBehaviorReplace
are.This may be a golang newbie problem, but this appears to prevent the use of the flag as a variable, e.g.
as the type of
replaceFlag
to decay toint
, resulting in errorIf the initialization of
replaceFlag
is explicitly typedsecretservice.replaceBehavior
then the build will fail withcannot refer to unexported name secretservice.replaceBehavior
. Same if an explicit cast is used when passing the argument.Unless this is me being a golang ignoramus, it seems like
secretservice.replaceBehavior
should be exported assecretservice.ReplaceBehavior
instead.