/
githubmirror
/
GoFrame
Обзор
Документация
Войти
/
githubmirror
/
GoFrame
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
net/goai/goai_header.go
31 строка
739 B
John Guo
move package goai from protocol to net
24 май 2022, 13:53
24 май 2022, 13:53
ea79b3c
Код
Авторство
О чём код?
// Copyright GoFrame Author(https://goframe.org). All Rights Reserved. // // This Source Code Form is subject to the terms of the MIT License. // If a copy of the MIT was not distributed with this file, // You can obtain one at https://github.com/gogf/gf. package goai import ( "github.com/gogf/gf/v2/internal/json" ) // Header is specified by OpenAPI/Swagger 3.0 standard. // See https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.0.md#headerObject type Header struct { Parameter } type Headers map[string]HeaderRef type HeaderRef struct { Ref string Value *Header } func (r HeaderRef) MarshalJSON() ([]byte, error) { if r.Ref != "" { return formatRefToBytes(r.Ref), nil } return json.Marshal(r.Value) }