这是indexloc提供的服务,不要输入任何密码
Skip to content

删除主机,如果不存在就出现500报错,能不能温柔处理一下,不要使用panic #2798

@Jalright

Description

@Jalright

panic("idents empty")

	if len(idents) == 0 {
		panic("idents empty")
	}

直接return err的错误不就好了,这里的panic有什么特殊用途吗?

Metadata

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