package game import ( "fmt" "os" ) func (gm *Game) RemoveQuote(fileName, usrId, quoteId string) error { if quote, err := gm.getQuoteById(quoteId); err != nil { return err } else { if quote.GetSourceId() != usrId { return fmt.Errorf("usrId does not match quote source id") } } err := os.Remove(fileName) if err != nil { return err } return nil }