New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/kemalerhalim/cookieservice

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/kemalerhalim/cookieservice

  • v0.0.0-20170727104143-77f07d62d9c3
  • Source
  • Go
  • Socket score

Version published
Created
Source

cookieservice.go

Simple cookie service made for golang.

Installation

First, get the package

go get github.com/kemalerhalim/cookieservice

Then import it

import(
    "github.com/kemalerhalim/cookieservice"
)

Usage

  • Getting value of a cookie:
        func HomePage(w http.ResponseWriter,req *http.Request){
            var value=cookieservice.ReadCookie(req,"cookieName")
            fmt.Println(value)
            ...
        }
  • Creating a cookie (Which will expire after 48 hours):
        func HomePage(w http.ResponseWriter,req *http.Request){
            cookieservice.NewCookie(w,"cookieName","cookieValue",48)
            ...
        }
  • Deleting a cookie:
        func HomePage(w http.ResponseWriter,r *http.Request){
            cookieservice.DeleteCookie(w,"cookieName")
            ...
        }

FAQs

Package last updated on 27 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc