Skip to content
Snippets Groups Projects
Select Git revision
  • 00e44097d5e7112acb7decd2d606d929b2c71a2f
  • master default protected
  • commit-alias
  • editor-modeline
  • commit-abbreviation
  • make-hooks-work-as-advertised
  • lyda-home-version
  • feature-aliases
  • git-version-bsd-fix
  • hook-changes
  • v1.20151229-1
  • v1.20151229
  • v1.20150502-1
  • v1.20150502
  • v1.20141026-manpage-static
  • v1.20141026-1
  • v1.20141026
  • v1.20141025-1
  • v1.20141025
  • v1.20141009-manpage-static
  • v1.20141009-1
  • v1.20141009
  • v1.20140508-1-bpo70+1
  • v1.20140508-1
  • v1.20140508-manpage-static
  • v1.20140508
  • v1.20140507
  • v1.20140313
  • v1.20131229-homebrew
  • v1.20131229-1-bpo60+1
30 results

000-tear-env.t

  • messages.go 670 B
    // Package folders are all the routines and sql for managing folders.
    package folders
    
    import "time"
    
    // CreateMessage creates a new folder.
    func (s *Store) CreateMessage(author, subject, message, folder string, permanent, shutdown int, expiration *time.Time) error {
    	_, err := s.db.Exec(
    		`INSERT INTO messages
    			(id, folder, author, subject, message, permanent, shutdown, expiration)
    			VALUES
    			($1, $2, $3, $4, $5, $6, $7, $8)`,
    		1, // TODO: how to set this.
    		folder,
    		author,
    		subject,
    		message,
    		permanent,
    		shutdown,
    		expiration, // TODO: handle this being NULL
    	)
    	// TODO: process this error a bit more to give a better error message.
    	return err
    }