forked from security/hakurei
message: rename NewMsg to New
Should have done this when relocating this from container. Now is a good time to rename it before v0.3.x. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -77,7 +77,7 @@ Flags:
|
||||
t.Parallel()
|
||||
|
||||
out := new(bytes.Buffer)
|
||||
c := buildCommand(t.Context(), message.NewMsg(nil), new(earlyHardeningErrs), out)
|
||||
c := buildCommand(t.Context(), message.New(nil), new(earlyHardeningErrs), out)
|
||||
if err := c.Parse(tc.args); !errors.Is(err, command.ErrHelp) && !errors.Is(err, flag.ErrHelp) {
|
||||
t.Errorf("Parse: error = %v; want %v",
|
||||
err, command.ErrHelp)
|
||||
|
||||
@@ -32,7 +32,7 @@ func main() {
|
||||
|
||||
log.SetPrefix("hakurei: ")
|
||||
log.SetFlags(0)
|
||||
msg := message.NewMsg(log.Default())
|
||||
msg := message.New(log.Default())
|
||||
|
||||
early := earlyHardeningErrs{
|
||||
yamaLSM: container.SetPtracer(0),
|
||||
|
||||
@@ -28,7 +28,7 @@ func TestShortIdentifier(t *testing.T) {
|
||||
func TestTryIdentifier(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
msg := message.NewMsg(nil)
|
||||
msg := message.New(nil)
|
||||
id := hst.ID{
|
||||
0x01, 0x23, 0x45, 0x67, 0x89, 0xab, 0xcd, 0xef,
|
||||
0xfe, 0xdc, 0xba, 0x98, 0x76, 0x54, 0x32, 0x10,
|
||||
|
||||
@@ -761,7 +761,7 @@ func TestPrintPs(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
var printBuf, logBuf bytes.Buffer
|
||||
msg := message.NewMsg(log.New(&logBuf, "check: ", 0))
|
||||
msg := message.New(log.New(&logBuf, "check: ", 0))
|
||||
msg.SwapVerbose(true)
|
||||
printPs(msg, &printBuf, testTime, s, tc.short, tc.json)
|
||||
if got := printBuf.String(); got != tc.want {
|
||||
|
||||
@@ -24,7 +24,7 @@ var (
|
||||
func main() {
|
||||
log.SetPrefix("hpkg: ")
|
||||
log.SetFlags(0)
|
||||
msg := message.NewMsg(log.Default())
|
||||
msg := message.New(log.Default())
|
||||
|
||||
if err := os.Setenv("SHELL", pathShell.String()); err != nil {
|
||||
log.Fatalf("cannot set $SHELL: %v", err)
|
||||
|
||||
Reference in New Issue
Block a user