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: twitter.go
    path of file: ./repos/goreleaser/internal/pipe/twitter
    
    the code of the file until where you have to start completion: package twitter

import (
	"fmt"

	"github.com/caarlos0/env/v9"
	"github.com/caarlos0/log"
	"github.com/dghubble/go-twitter/twitter"
	"github.com/dghubble/oauth1"
	"github.com/goreleaser/goreleaser/internal/tmpl"
	"github.com/goreleaser/goreleaser/pkg/context"
)

const defaultMessageTemplate = `{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}`

type Pipe struct{}

func (Pipe) String() string                 { return "twitter" }
func (Pipe) Skip(ctx *context.Context) bool { return !ctx.Config
    
func (Pipe) Announce(ctx *context.Context) error {
	msg, err := tmpl.New(ctx).Apply(ctx.Config.Announce.Twitter.MessageTemplate)
	if err != nil {
		return fmt.Errorf("twitter: %w", err)
	}

	var cfg Config
	if err := env.Parse(&cfg); err != nil {
		return fmt.Errorf("twitter: %w", err)
	}

	log.Infof("posting: '%s'", msg)
	config := oauth1.NewConfig(cfg.ConsumerKey, cfg.ConsumerSecret)
	token := oauth1.NewToken(cfg.AccessToken, cfg.AccessSecret)
	client := twitter.NewClient(config.Client(oauth1.NoContext, token))
	if _, _, err := client.Statuses.Update(msg, nil); err != nil {
		return fmt.Errorf("twitter: %w", err)
	}
	return nil
}