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: caddyfile.go
    path of file: ./repos/caddy/modules/caddyhttp/push
    
    the code of the file until where you have to start completion: // Copyright 2015 Matthew Holt and The Caddy Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this
    
func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) {
	h.Next() // consume directive name

	handler := new(Handler)

	// inline resources
	if h.NextArg() {
		handler.Resources = append(handler.Resources, Resource{Target: h.Val()})
	}

	// optional block
	for h.NextBlock(0) {
		switch h.Val() {
		case "headers":
			if h.NextArg() {
				return nil, h.ArgErr()
			}
			for nesting := h.Nesting(); h.NextBlock(nesting); {
				var err error

				// include current token, which we treat as an argument here
				args := []string{h.Val()}
				args = append(args, h.RemainingArgs()...)

				if handler.Headers == nil {
					handler.Headers = new(HeaderConfig)
				}

				switch len(args) {
				case 1:
					err = headers.CaddyfileHeaderOp(&handler.Headers.HeaderOps, args[0], "", "")
				case 2:
					err = headers.CaddyfileHeaderOp(&handler.Headers.HeaderOps, args[0], args[1], "")
				case 3:
					err = headers.CaddyfileHeaderOp(&handler.Headers.HeaderOps, args[0], args[1], args[2])
				default:
					return nil, h.ArgErr()
				}

				if err != nil {
					return nil, h.Err(err.Error())
				}
			}

		case "GET", "HEAD":
			method := h.Val()
			if !h.NextArg() {
				return nil, h.ArgErr()
			}
			target := h.Val()
			handler.Resources = append(handler.Resources, Resource{
				Method: method,
				Target: target,
			})

		default:
			handler.Resources = append(handler.Resources, Resource{Target: h.Val()})
		}
	}
	return handler, nil
}