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: main.go
    path of file: ./repos/dotenx/predefinedImages/triggers/facebook-new-post-in-feed
    
    the code of the file until where you have to start completion: package main

import (
	"bytes"
	"context"
	"encoding/json"
	"errors"
	"io"
	"io/ioutil"
	"log"
	"net/http"
	"os"
	"strconv"
	"time"
)

func main() {
	pipelineEndpoint := os.Getenv("PIPELINE_ENDPOINT")
	accId := os.Getenv("ACCOUNT_ID")
	triggerName := os.Getenv("TRIGGER_NAME")
	if triggerName == "" {
		log.Println("your trigger name is not set")
		return
	}
	accessToken := os.Getenv("INTEGRATION_ACCESS_TOKEN")
	passedSeconds := os.Getenv("passed_seconds")
	seconds, err := strconv.Atoi(passedSeconds)
	if err != nil {
		log.Println(err.Error(
    
func getPostsList(userId, accessToken string) (postsCreatedTime []string, err error) {
	url := "https://graph.facebook.com/" + userId + "/feed?access_token=" + accessToken
	out, err, statusCode, _ := httpRequest(http.MethodGet, url, nil, nil, 0)
	if err != nil || statusCode != http.StatusOK {
		log.Println("facebook response (get posts list request):", string(out))
		if statusCode != http.StatusOK {
			err = errors.New("can't get correct response from facebook")
		}
		return
	}
	type post struct {
		CreatedTime string `json:"created_time"`
		Message     string `json:"message"`
		Id          string `json:"id"`
	}
	var resp struct {
		Data []post `json:"data"`
	}
	err = json.Unmarshal(out, &resp)
	if err != nil {
		log.Println(err)
		return
	}
	postsCreatedTime = make([]string, 0)
	for _, p := range resp.Data {
		postsCreatedTime = append(postsCreatedTime, p.CreatedTime)
	}
	return
}