// ActionsWrite returns a list of instructions with a single element used
// to write the set of specified actions.
180796
func ActionsWrite(actions ...ofp.Action) ofp.Instructions {
	return ofp.Instructions{&ofp.InstructionWriteActions{actions}}
}
1248380
func (w *minifyWriter) Write(b []byte) (int, error) {
	return w.pw.Write(b)
}
1358592
func (p *PolicyAuthorizer) OperatorWrite() bool {
	if allow, recurse := enforce(p.operatorRule, PolicyWrite); !recurse {
		return allow
	}

	return p.parent.OperatorWrite()
}
389481
func (c *C2) Write(b []byte) {
	c.a.Write(b)
	c.b.Write(b)
	c.lastWritten = len(b)
	c.totalWritten += c.lastWritten
}
1088076
func (w *Writer) Write(p []byte) (int, error) {
	nWritten := 0
	ss := strings.Split(string(p), "\n")
	for i, s := range ss {
		// TODO: strip out pre-existing ANSI codes and expand tabs. Would be
		// great to expand tabs in a context aware way (line linux expand
		// command).

		n, err := w.writeRaw(s)
		if err != nil {
			return nWritten, err
		}
		nWritten += n

		// Increment the origin (line count) for each newline.  There is a
		// newline for every item in this array except the last one.
		if i != len(ss)-1 {
			n, err := w.Output.Write([]byte("\n"))
			if err != nil {
				return nWritten, err
			}
			nWritten += n
			w.origin++
			w.lineIdx = 0
		}
	}
	return nWritten, nil
}
480314
func (r *AutoVLANOperResource) Write() error {
	key := fmt.Sprintf(vLANResourceOperPath, r.ID)
	return r.StateDriver.WriteState(key, r, json.Marshal)
}
113234
func (f *Adaptor) PwmWrite(pin string, level byte) (err error) {
	p, err := strconv.Atoi(pin)
	if err != nil {
		return err
	}

	if f.Board.Pins()[p].Mode != client.Pwm {
		err = f.Board.SetPinMode(p, client.Pwm)
		if err != nil {
			return err
		}
	}
	err = f.Board.AnalogWrite(p, int(level))
	return
}
650492
func (w *BroadcastWriter) Write(p []byte) (n int, err error) {
	for _, writer := range w.writers {
		n, err = writer.Write(p)
		if err != nil {
			return
		}
		if n != len(p) {
			err = io.ErrShortWrite
			return
		}
	}
	return len(p), nil
}
1175592
func (fs *KBFSOpsStandard) Write(
	ctx context.Context, file Node, data []byte, off int64) error {
	timeTrackerDone := fs.longOperationDebugDumper.Begin(ctx)
	defer timeTrackerDone()

	ops := fs.getOpsByNode(ctx, file)
	return ops.Write(ctx, file, data, off)
}
624109
func (w *Writer) Write(b []byte) (int, error) {
	n := len(b)
	end := len(w.buf)
	if end+n > cap(w.buf) {
		buf := make([]byte, end, 2*cap(w.buf)+n)
		copy(buf, w.buf)
		w.buf = buf
	}
	w.buf = w.buf[:end+n]
	return copy(w.buf[end:], b), nil
}
472683
func ActionsApply(actions ...ofp.Action) ofp.Instructions {
	return ofp.Instructions{&ofp.InstructionApplyActions{actions}}
}
107340
func (a *ActionGroup) WriteTo(w io.Writer) (int64, error) {
	return encoding.WriteTo(w, action{a.Type(), actionLen}, a.Group)
}
616960
func (r *Rules) Write(wr io.Writer) (err error) {
	id := callbackData.Put(wr)
	defer callbackData.Delete(id)

	stream := C.YR_STREAM{
		write: C.YR_STREAM_WRITE_FUNC(C.streamWrite),
		// The complaint from go vet about possible misuse of
		// unsafe.Pointer is wrong: user_data will be interpreted as
		// an uintptr on the other side of the callback
		user_data: id,
	}
	err = newError(C.yr_rules_save_stream(r.cptr, &stream))
	keepAlive(r)
	return
}
1016357
func (a *adapter) Write(app string, message string) error {
	// Check first if we might actually have to add to the map of file pointers so we can avoid
	// waiting for / obtaining a lock unnecessarily
	f, ok := a.files[app]
	if !ok {
		// Ensure only one goroutine at a time can be adding a file pointer to the map of file
		// pointers
		a.mutex.Lock()
		defer a.mutex.Unlock()
		f, ok = a.files[app]
		if !ok {
			var err error
			f, err = a.getFile(app)
			if err != nil {
				return err
			}
			a.files[app] = f
		}
	}
	if _, err := f.WriteString(message + "\n"); err != nil {
		return err
	}
	return nil
}
326122
func (s *syncWriter) Write(p []byte) (n int, err error) {
	s.mu.Lock()
	defer s.mu.Unlock()
	return s.lw.Write(p)
}
287319
func (af *AutoFile) Write(b []byte) (n int, err error) {
	af.mtx.Lock()
	defer af.mtx.Unlock()

	if af.file == nil {
		if err = af.openFile(); err != nil {
			return
		}
	}

	n, err = af.file.Write(b)
	return
}
853208
func (ui UgenInput) Write(w io.Writer) error {
	if we := binary.Write(w, byteOrder, ui.UgenIndex); we != nil {
		return we
	}
	return binary.Write(w, byteOrder, ui.OutputIndex)
}