Skip to content

[gen_tcp.erl] code smell #6

@tank-bohr

Description

@tank-bohr
<function>(S) ->
    case inet_db:lookup_socket(S) of
	{ok, Mod} ->
	    Mod:<function>(S);
	Error ->
	    Error
    end.

This pattern repeats itself all over the place. It can be replaced by a macro or a higher order function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions