Skip to content
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.
This repository has been archived by the owner on Aug 2, 2023. It is now read-only.

Suspicious commented-out code #40

Open
@quasilyte

Description

While doing an audit, I've found pieces of code like:

func (p *state) packFloat(o option, v interface{}) error {
	fmt.Println("pack: float")
	// return p.pack(o, v)
	return nil
}


func (p *state) packString(o option, v interface{}) error {
	fmt.Println("pack: string")
	// return p.pack(o, v)
	return nil
}

It looks like commented-out code should be uncommented while fmt.Println statement is to be removed.
Since I'm not familiar with the project or what the packer is, opening an issue instead of sending you a PR.

Another suspicious place:

func (p *state) packInt(o option, v interface{}) error {
	// fmt.Printf("packInt (%t) => %T\n", o.typ == optUint, v)
	if v, ok := v.(Packer); ok {
		return v.Pack(p)
	}
	// return p.pack(o, v)
	return nil
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions