You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: rpc-kill.go
    path of file: ./repos/sliver/server/rpc
    
    the code of the file until where you have to start completion: package rpc

/*
	Sliver Implant Framework
	Copyright (C) 2022  Bishop Fox

	This program is free software: you can redistribute it and/or modify
	it under the terms of the GNU General Public License 
    
func (rpc *Server) Kill(ctx context.Context, kill *sliverpb.KillReq) (*commonpb.Empty, error) {
	var (
		beacon *models.Beacon
		err    error
	)
	session := core.Sessions.Get(kill.Request.SessionID)
	if session == nil {
		beacon, err = db.BeaconByID(kill.Request.BeaconID)
		if err != nil {
			return &commonpb.Empty{}, ErrInvalidBeaconID
		} else {
			return rpc.killBeacon(kill, beacon)
		}
	}
	return rpc.killSession(kill, session)
}