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: googlechat.go
    path of file: ./repos/vuls/reporter
    
    the code of the file until where you have to start completion: package reporter

import (
	"bytes"
	"context"
	"fmt"
	"net/http"
	"regexp"
	"strings"
	"time"

	"github.com/future-architect/vuls/config"
	"github.com/future-architect/vuls/models"
	"github.com/future-architect/vuls/util"
	"golang.org/x/xerrors"
)

// GoogleChatWriter send report to GoogleChat
type GoogleChatWriter struct {
	Cnf   config.GoogleChatConf
	Proxy string
}

// Write results to Google Chat
func (w GoogleChatWriter) Write(rs ...models.ScanResult) (err error) {
	re := regexp.MustCompile(w.Cnf.ServerNameRegexp)

	for _, r := range rs {
		if re.MatchString(r.FormatServerName()) {
			continue
		}
		msgs := []string{fmt.Sprintf("*%s*\n%s\t%s\t%s",
			r.ServerInfo(),
			r.ScannedCves.FormatCveSummary(),
			r.ScannedCves.FormatFixedStatus(r.Packages),
			r.FormatUpdatablePkgsSummary())}
		for _, vinfo := range r.ScannedCves.ToSortedSlice() {
			max := vinfo.MaxCvssScore().Value.Score

			exploits := ""
			if 0 < len(vinfo.Exploits) || 0 < len(vinfo.Metasploits) {
				exploits = "*PoC*"
			}

			link := ""
			if strings.HasPrefix(vinfo.CveID, "CVE-") {
				link = fmt.Sprintf("https://nvd.nist.gov/vuln/detail/%s", vinfo.CveID)
			} else if strings.HasPrefix(vinfo.CveID, "WPVDBID-") {
				link = fmt.Sprintf("https://wpscan.com/vulnerabilities/%s", strings.TrimPrefix(vinfo.CveID, "WPVDBID-"))
			}

			ms
    
func (w GoogleChatWriter) Write(rs ...models.ScanResult) (err error) {
	re := regexp.MustCompile(w.Cnf.ServerNameRegexp)

	for _, r := range rs {
		if re.MatchString(r.FormatServerName()) {
			continue
		}
		msgs := []string{fmt.Sprintf("*%s*\n%s\t%s\t%s",
			r.ServerInfo(),
			r.ScannedCves.FormatCveSummary(),
			r.ScannedCves.FormatFixedStatus(r.Packages),
			r.FormatUpdatablePkgsSummary())}
		for _, vinfo := range r.ScannedCves.ToSortedSlice() {
			max := vinfo.MaxCvssScore().Value.Score

			exploits := ""
			if 0 < len(vinfo.Exploits) || 0 < len(vinfo.Metasploits) {
				exploits = "*PoC*"
			}

			link := ""
			if strings.HasPrefix(vinfo.CveID, "CVE-") {
				link = fmt.Sprintf("https://nvd.nist.gov/vuln/detail/%s", vinfo.CveID)
			} else if strings.HasPrefix(vinfo.CveID, "WPVDBID-") {
				link = fmt.Sprintf("https://wpscan.com/vulnerabilities/%s", strings.TrimPrefix(vinfo.CveID, "WPVDBID-"))
			}

			msgs = append(msgs, fmt.Sprintf(`%s %s %4.1f %5s %s`,
				vinfo.CveIDDiffFormat(),
				link,
				max,
				vinfo.AttackVector(),
				exploits))
			if len(msgs) == 50 {
				msgs = append(msgs, "(The rest is omitted.)")
				break
			}
		}
		if len(msgs) == 1 && w.Cnf.SkipIfNoCve {
			msgs = []string{}
		}
		if len(msgs) != 0 {
			if err = w.postMessage(strings.Join(msgs, "\n")); err != nil {
				return err
			}
		}
	}
	return nil
}