Skip to content

Nlreturn sees linter error in CGO code without such error #4

@risentveber

Description

@risentveber

Initial issue golangci/golangci-lint#1455

Get error

client/ton_client.go:42:124: return with no blank line before (nlreturn)
	return C.GoBytes(unsafe.Pointer(data.content), C.int(data.len))

for the file with content:

func newBytesFromTcStr(data C.tc_string_data_t) []byte {
	if data.len == 0 {
		return nil
	}

	return C.GoBytes(unsafe.Pointer(data.content), C.int(data.len))
}

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions