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

Delete the host. If it doesn't exist, a 500 error occurs. Can you handle it gently and not use 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