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: sandbox_publisher.go
    path of file: ./repos/flyte/flyteadmin/pkg/async/notifications/implementations
    
    the code of the file until where you have to start completion: package implementations

import (
	"context"

	"github.com/golang/protobuf/proto"

	"github.com/flyteorg/fly
    
func (p *SandboxPublisher) Publish(ctx context.Context, notificationType string, msg proto.Message) error {
	logger.Debugf(ctx, "Publishing the following message [%s]", msg.String())

	data, err := proto.Marshal(msg)

	if err != nil {
		logger.Errorf(ctx, "Failed to publish a message with key [%s] and message [%s] and error: %v", notificationType, msg.String(), err)
		return err
	}

	p.pubChan <- data

	return nil
}