hunk.code_window: 	}
   	if err := transaction.Insert(channel); err != nil {
   		if IsUniqueConstraintError(err.Error(), []string{"Name", "channels_name_teamid_key"}) {
   			dupChannel := model.Channel{}
   			s.GetMaster().SelectOne(&dupChannel, "SELECT * FROM Channels WHERE TeamId = :TeamId AND Name = :Name", map[string]interface{}{"TeamId": channel.TeamId, "Name": channel.Name})
   			if dupChannel.DeleteAt > 0 {
   				result.Err = model.NewAppError("SqlChannelStore.Save", "store.sql_channel.save_channel.previously.app_error", nil, "id="+channel.Id+", "+err.Error(), http.StatusBadRequest)
   			} else {
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit: 		if IsUniqueConstraintError(err, []string{"Name", "channels_name_teamid_key"}) {
  
hunk.file_path: store/sql_channel_store.go
hunk.type: replace
file: // Copyright 2015 The Go Authors. All rights reserved.
  // Use of this source code is governed by a BSD-style
  // license that can be found in the LICENSE file.
  
  // Package format contains types for defining language-specific formatting of
  // values.
  //
  // This package is internal now, but will eventually be exposed after the API
  // settles.
  package format // import "golang.org/x/text/internal/format"
  
  import (
  	"fmt"
  
  	"golang.org/x/text/language"
  )
  
  // State represents the printer state passed to custom formatters. It provides
  // access to the fmt.State interface and the sentence and language-related
  // context.
  type State interface {
  	fmt.State
  
  	// Language reports the requested language in which to render a message.
  	Language() language.Tag
  
  	// TODO: more info:
  	// - sentence context
  	// - user preferences, like measurement systems
  	// - options
  }
  
  // A Statement is a Var or an Expression.
  type Statement interface {
  	statement()
  }
  
  // A String a literal string format.
  type String string
  
  func (String) statement() {}
  
  // TODO: Select, Var, Case, StatementSequence
  