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: context.go
    path of file: ./repos/ZeroBot-Plugin/plugin/aipaint
    
    the code of the file until where you have to start completion: package aipaint

import (
	"os"
	"strconv"
	"strings"

	"github.com/FloatTech/floatbox/file"
	"github.com/FloatTech/floatbox/process"
)

type context struct {
	usrdir      string
	headimgsdir []string
}

func newContext(user int64) *context {
	c := new(context)
	c.usrdir = datapath + "users/" + strconv.FormatInt(user, 10) + `/`
	_ = os.MkdirAll(c.usrdir, 0755)
	c.headimgsdir = make([]string, 2)
    
func (cc *context) prepareLogos(s ...string) error {
	for i, v := range s {
		_, err := strconv.Atoi(v)
		if err != nil {
			err = file.DownloadTo("https://gchat.qpic.cn/gchatpic_new//--"+strings.ToUpper(v)+"/0", cc.usrdir+strconv.Itoa(i)+".gif")
		} else {
			err = file.DownloadTo("http://q4.qlogo.cn/g?b=qq&nk="+v+"&s=640", cc.usrdir+strconv.Itoa(i)+".gif")
		}
		if err != nil {
			return err
		}
		process.SleepAbout1sTo2s()
	}
	return nil
}